summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorWang Shilong <wangsl.fnst@cn.fujitsu.com>2014-07-17 11:44:13 +0800
committerChris Mason <clm@fb.com>2014-08-19 08:52:12 -0700
commit9a025a0860ccc0f02af153c966bc1f83e5d9fc62 (patch)
tree6e70f8a6f07dbdb11552db5596671bb2e66ab5d3 /fs
parent3a7d55c84c76a3088ddfb798c187182143683a16 (diff)
downloadblackbird-op-linux-9a025a0860ccc0f02af153c966bc1f83e5d9fc62.tar.gz
blackbird-op-linux-9a025a0860ccc0f02af153c966bc1f83e5d9fc62.zip
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/inode.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 33c05188cbf0..73fadc7ead0e 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -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) {
/*
OpenPOWER on IntegriCloud