summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2009-09-30 22:47:08 +0200
committerChris Mason <chris.mason@oracle.com>2009-10-01 16:27:01 +0200
commit35d62a942db5ae03104929fe7397835b572c4bc4 (patch)
tree91ea5b0a79e898f57cd644e1ff0437748aa0781b /fs/btrfs/disk-io.c
parentBtrfs: fix deadlock with free space handling and user transactions (diff)
downloadlinux-35d62a942db5ae03104929fe7397835b572c4bc4.tar.xz
linux-35d62a942db5ae03104929fe7397835b572c4bc4.zip
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: Christoph Hellwig <hch@lst.de> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to '')
-rw-r--r--fs/btrfs/disk-io.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index ece8d1e26b5e..69dce50aabd2 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -829,7 +829,9 @@ int btrfs_write_tree_block(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,
- 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,