summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/relocation.c
diff options
context:
space:
mode:
authorMiao Xie2012-12-21 10:17:45 +0100
committerJosef Bacik2013-02-20 15:36:43 +0100
commit4eee4fa4f8ab8c2b2623c22be4c3cb91d525aa57 (patch)
tree683eda1d306b23d1a82a918d869850256237c432 /fs/btrfs/relocation.c
parentBtrfs: flush all dirty inodes if writeback can not start (diff)
downloadkernel-qcow2-linux-4eee4fa4f8ab8c2b2623c22be4c3cb91d525aa57.tar.gz
kernel-qcow2-linux-4eee4fa4f8ab8c2b2623c22be4c3cb91d525aa57.tar.xz
kernel-qcow2-linux-4eee4fa4f8ab8c2b2623c22be4c3cb91d525aa57.zip
Btrfs: use wrapper page_offset
Use wrapper page_offset to get byte-offset into filesystem object for page. Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com> Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Diffstat (limited to 'fs/btrfs/relocation.c')
-rw-r--r--fs/btrfs/relocation.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
index 300e09ac3659..ba5a3210da9a 100644
--- a/fs/btrfs/relocation.c
+++ b/fs/btrfs/relocation.c
@@ -3017,7 +3017,7 @@ static int relocate_file_extent_cluster(struct inode *inode,
}
}
- page_start = (u64)page->index << PAGE_CACHE_SHIFT;
+ page_start = page_offset(page);
page_end = page_start + PAGE_CACHE_SIZE - 1;
lock_extent(&BTRFS_I(inode)->io_tree, page_start, page_end);