Commit 35d62a94 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Chris Mason

Btrfs: fix arguments to btrfs_wait_on_page_writeback_range

wait_on_page_writeback_range/btrfs_wait_on_page_writeback_range takes
a pagecache offset, not a byte offset into the file.  Shift the arguments
around to wait for the correct range
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parent dd7e0b7b
...@@ -829,7 +829,9 @@ int btrfs_write_tree_block(struct extent_buffer *buf) ...@@ -829,7 +829,9 @@ int btrfs_write_tree_block(struct extent_buffer *buf)
int btrfs_wait_tree_block_writeback(struct extent_buffer *buf) int btrfs_wait_tree_block_writeback(struct extent_buffer *buf)
{ {
return btrfs_wait_on_page_writeback_range(buf->first_page->mapping, return btrfs_wait_on_page_writeback_range(buf->first_page->mapping,
buf->start, buf->start + buf->len - 1); buf->start >> PAGE_CACHE_SHIFT,
(buf->start + buf->len - 1) >>
PAGE_CACHE_SHIFT);
} }
struct extent_buffer *read_tree_block(struct btrfs_root *root, u64 bytenr, struct extent_buffer *read_tree_block(struct btrfs_root *root, u64 bytenr,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment