aboutsummaryrefslogtreecommitdiffstats
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 88b3ef20be69..0df325f89d62 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,
652 u64 page_start = page->index << PAGE_CACHE_SHIFT; 652 u64 page_start = page->index << PAGE_CACHE_SHIFT;
653 u64 page_end = page_start + PAGE_CACHE_SIZE - 1; 653 u64 page_end = page_start + PAGE_CACHE_SIZE - 1;
654 654
655 if (!PagePrivate(page)) { 655 set_page_extent_mapped(page);
656 SetPagePrivate(page);
657 set_page_private(page, 1);
658 WARN_ON(!page->mapping->a_ops->invalidatepage);
659 page_cache_get(page);
660 }
661 656
662 lock_extent(em_tree, page_start, page_end, GFP_NOFS); 657 lock_extent(em_tree, page_start, page_end, GFP_NOFS);
663 set_extent_delalloc(&BTRFS_I(inode)->extent_tree, page_start, 658 set_extent_delalloc(&BTRFS_I(inode)->extent_tree, page_start,