diff options
author | Miao Xie <miaox@cn.fujitsu.com> | 2012-12-21 09:17:45 +0000 |
---|---|---|
committer | Josef Bacik <jbacik@fusionio.com> | 2013-02-20 09:36:43 -0500 |
commit | 4eee4fa4f8ab8c2b2623c22be4c3cb91d525aa57 (patch) | |
tree | 683eda1d306b23d1a82a918d869850256237c432 /fs/btrfs/inode.c | |
parent | da633a42170165cbf20a2d3886c7480ccc832ec3 (diff) | |
download | op-kernel-dev-4eee4fa4f8ab8c2b2623c22be4c3cb91d525aa57.zip op-kernel-dev-4eee4fa4f8ab8c2b2623c22be4c3cb91d525aa57.tar.gz |
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/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 1ea0988..35d1524 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -2062,7 +2062,7 @@ static int btrfs_writepage_end_io_hook(struct page *page, u64 start, u64 end, static int btrfs_readpage_end_io_hook(struct page *page, u64 start, u64 end, struct extent_state *state, int mirror) { - size_t offset = start - ((u64)page->index << PAGE_CACHE_SHIFT); + size_t offset = start - page_offset(page); struct inode *inode = page->mapping->host; struct extent_io_tree *io_tree = &BTRFS_I(inode)->io_tree; char *kaddr; @@ -6752,8 +6752,7 @@ static void btrfs_invalidatepage(struct page *page, unsigned long offset) return; } lock_extent_bits(tree, page_start, page_end, 0, &cached_state); - ordered = btrfs_lookup_ordered_extent(inode, - page_offset(page)); + ordered = btrfs_lookup_ordered_extent(inode, page_offset(page)); if (ordered) { /* * IO on this page will never be started, so we need |