diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-04-18 16:11:30 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:04:02 -0400 |
commit | 9ad6b7bc2e00ba02f915cffd5b6bcd6564bb2c75 (patch) | |
tree | 8a07ab45a145ac723bdfe011a187d09eb0cc2803 /fs/btrfs/inode.c | |
parent | 0afbaf8c8216a0de64b55c2d455de2b6c9dde5eb (diff) |
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.c | 6 |
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) | |||
2524 | tree = &BTRFS_I(page->mapping->host)->io_tree; | 2524 | tree = &BTRFS_I(page->mapping->host)->io_tree; |
2525 | extent_invalidatepage(tree, page, offset); | 2525 | extent_invalidatepage(tree, page, offset); |
2526 | btrfs_releasepage(page, GFP_NOFS); | 2526 | btrfs_releasepage(page, GFP_NOFS); |
2527 | if (PagePrivate(page)) { | ||
2528 | printk("invalidate page cleaning up after releasepage\n"); | ||
2529 | ClearPagePrivate(page); | ||
2530 | set_page_private(page, 0); | ||
2531 | page_cache_release(page); | ||
2532 | } | ||
2527 | } | 2533 | } |
2528 | 2534 | ||
2529 | /* | 2535 | /* |