Btrfs: fix wrong write range for filemap_fdatawrite_range()

filemap_fdatawrite_range() expect the third arg to be @end
not @len, fix it.

Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
This commit is contained in:
Wang Shilong 2014-07-17 11:44:13 +08:00 committed by Chris Mason
parent 3a7d55c84c
commit 9a025a0860

View file

@ -7533,7 +7533,8 @@ static ssize_t btrfs_direct_IO(int rw, struct kiocb *iocb,
count = iov_iter_count(iter);
if (test_bit(BTRFS_INODE_HAS_ASYNC_EXTENT,
&BTRFS_I(inode)->runtime_flags))
filemap_fdatawrite_range(inode->i_mapping, offset, count);
filemap_fdatawrite_range(inode->i_mapping, offset,
offset + count - 1);
if (rw & WRITE) {
/*