Commit 9f3959c5 authored by Liu Bo's avatar Liu Bo Committed by Josef Bacik

Btrfs: get right arguments for btrfs_wait_ordered_range

btrfs_wait_ordered_range expects for 'len' instead of 'end'.
Signed-off-by: default avatarLiu Bo <bo.li.liu@oracle.com>
Signed-off-by: default avatarChris Mason <chris.mason@fusionio.com>
parent 183f37fa
......@@ -1562,7 +1562,7 @@ int btrfs_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
* range being left.
*/
atomic_inc(&root->log_batch);
btrfs_wait_ordered_range(inode, start, end);
btrfs_wait_ordered_range(inode, start, end - start + 1);
atomic_inc(&root->log_batch);
/*
......
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