diff options
author | Christoph Hellwig <hch@lst.de> | 2007-09-17 11:25:58 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:03:56 -0400 |
commit | b3cfa35a493866cffd00952438b6c77364d42d3c (patch) | |
tree | f0714eca2635db044d2c8edeaad2f2fd3d096070 /fs/btrfs/file.c | |
parent | 8e1cd766643f040fd88b9c4221353a3f6b77db1e (diff) |
Btrfs: factor page private preparations into a helper
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r-- | fs/btrfs/file.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 698eaea612f1..4cc459c943ec 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c | |||
@@ -543,12 +543,7 @@ static int prepare_pages(struct btrfs_root *root, | |||
543 | } | 543 | } |
544 | cancel_dirty_page(pages[i], PAGE_CACHE_SIZE); | 544 | cancel_dirty_page(pages[i], PAGE_CACHE_SIZE); |
545 | wait_on_page_writeback(pages[i]); | 545 | wait_on_page_writeback(pages[i]); |
546 | if (!PagePrivate(pages[i])) { | 546 | set_page_extent_mapped(pages[i]); |
547 | SetPagePrivate(pages[i]); | ||
548 | set_page_private(pages[i], 1); | ||
549 | WARN_ON(!pages[i]->mapping->a_ops->invalidatepage); | ||
550 | page_cache_get(pages[i]); | ||
551 | } | ||
552 | WARN_ON(!PageLocked(pages[i])); | 547 | WARN_ON(!PageLocked(pages[i])); |
553 | } | 548 | } |
554 | return 0; | 549 | return 0; |