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) | |
download | lwn-b3cfa35a493866cffd00952438b6c77364d42d3c.tar.gz lwn-b3cfa35a493866cffd00952438b6c77364d42d3c.zip |
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, } cancel_dirty_page(pages[i], PAGE_CACHE_SIZE); wait_on_page_writeback(pages[i]); - if (!PagePrivate(pages[i])) { - SetPagePrivate(pages[i]); - set_page_private(pages[i], 1); - WARN_ON(!pages[i]->mapping->a_ops->invalidatepage); - page_cache_get(pages[i]); - } + set_page_extent_mapped(pages[i]); WARN_ON(!PageLocked(pages[i])); } return 0; |