Call try_to_free_buffers() when a page can be released. This behaviour 
changed during 2.5 and wasn't fixed in hfs while porting it to 2.6.
Also remove an unnecessary PageActive() check, only the node ref count is 
really relevant.

Signed-off-by: Roman Zippel <[EMAIL PROTECTED]>

---

 hfs/inode.c     |    2 +-
 hfsplus/inode.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Index: linux-2.6.11/fs/hfs/inode.c
===================================================================
--- linux-2.6.11.orig/fs/hfs/inode.c    2005-03-18 23:54:16.284668127 +0100
+++ linux-2.6.11/fs/hfs/inode.c 2005-03-18 23:54:28.367592303 +0100
@@ -71,12 +71,6 @@ int hfs_releasepage(struct page *page, i
                        ;
                else if (atomic_read(&node->refcnt))
                        res = 0;
-               else for (i = 0; i < tree->pages_per_bnode; i++) {
-                       if (PageActive(node->page[i])) {
-                               res = 0;
-                               break;
-                       }
-               }
                if (res && node) {
                        hfs_bnode_unhash(node);
                        hfs_bnode_free(node);
@@ -100,7 +100,7 @@ int hfs_releasepage(struct page *page, i
                spin_unlock(&tree->hash_lock);
        }
        //printk("releasepage: %lu,%x = %d\n", page->index, mask, res);
-       return res;
+       return res ? try_to_free_buffers(page) : 0;
 }
 
 static int hfs_get_blocks(struct inode *inode, sector_t iblock, unsigned long 
max_blocks,
Index: linux-2.6.11/fs/hfsplus/inode.c
===================================================================
--- linux-2.6.11.orig/fs/hfsplus/inode.c        2005-03-18 23:54:16.284668127 
+0100
+++ linux-2.6.11/fs/hfsplus/inode.c     2005-03-18 23:54:28.367592303 +0100
@@ -71,12 +71,6 @@ int hfsplus_releasepage(struct page *pag
                        ;
                else if (atomic_read(&node->refcnt))
                        res = 0;
-               else for (i = 0; i < tree->pages_per_bnode; i++) {
-                       if (PageActive(node->page[i])) {
-                               res = 0;
-                               break;
-                       }
-               }
                if (res && node) {
                        hfs_bnode_unhash(node);
                        hfs_bnode_free(node);
@@ -100,7 +100,7 @@ int hfsplus_releasepage(struct page *pag
                spin_unlock(&tree->hash_lock);
        }
        //printk("releasepage: %lu,%x = %d\n", page->index, mask, res);
-       return res;
+       return res ? try_to_free_buffers(page) : 0;
 }
 
 static int hfsplus_get_blocks(struct inode *inode, sector_t iblock, unsigned 
long max_blocks,
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to