summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorChris Mason2008-04-18 22:11:30 +0200
committerChris Mason2008-09-25 17:04:02 +0200
commit9ad6b7bc2e00ba02f915cffd5b6bcd6564bb2c75 (patch)
tree8a07ab45a145ac723bdfe011a187d09eb0cc2803 /fs/btrfs/inode.c
parentBtrfs: Set the btree inode i_size to OFFSET_MAX (diff)
downloadkernel-qcow2-linux-9ad6b7bc2e00ba02f915cffd5b6bcd6564bb2c75.tar.gz
kernel-qcow2-linux-9ad6b7bc2e00ba02f915cffd5b6bcd6564bb2c75.tar.xz
kernel-qcow2-linux-9ad6b7bc2e00ba02f915cffd5b6bcd6564bb2c75.zip
Force page->private removal in btrfs_invalidatepage
btrfs_invalidatepage is not allowed to leave pages around on the lru. Any such pages will trigger an oops later on because the VM will see page->private and assume it is a buffer head. This also forces extra flushes of the async work queues before dropping all the pages on the btree inode during unmount. Left over items on the work queues are one possible cause of busy state ranges during truncate_inode_pages. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 40f8da884090..347cd85db128 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -2524,6 +2524,12 @@ static void btrfs_invalidatepage(struct page *page, unsigned long offset)
tree = &BTRFS_I(page->mapping->host)->io_tree;
extent_invalidatepage(tree, page, offset);
btrfs_releasepage(page, GFP_NOFS);
+ if (PagePrivate(page)) {
+ printk("invalidate page cleaning up after releasepage\n");
+ ClearPagePrivate(page);
+ set_page_private(page, 0);
+ page_cache_release(page);
+ }
}
/*