summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2007-09-17 11:25:58 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:03:56 -0400
commitb3cfa35a493866cffd00952438b6c77364d42d3c (patch)
treef0714eca2635db044d2c8edeaad2f2fd3d096070 /fs/btrfs/inode.c
parent8e1cd766643f040fd88b9c4221353a3f6b77db1e (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/inode.c')
-rw-r--r--fs/btrfs/inode.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 88b3ef20be6..0df325f89d6 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -652,12 +652,7 @@ static int btrfs_cow_one_page(struct inode *inode, struct page *page,
u64 page_start = page->index << PAGE_CACHE_SHIFT;
u64 page_end = page_start + PAGE_CACHE_SIZE - 1;
- if (!PagePrivate(page)) {
- SetPagePrivate(page);
- set_page_private(page, 1);
- WARN_ON(!page->mapping->a_ops->invalidatepage);
- page_cache_get(page);
- }
+ set_page_extent_mapped(page);
lock_extent(em_tree, page_start, page_end, GFP_NOFS);
set_extent_delalloc(&BTRFS_I(inode)->extent_tree, page_start,