Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9a025a08 authored by Wang Shilong's avatar Wang Shilong Committed by Chris Mason
Browse files

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: default avatarWang Shilong <wangsl.fnst@cn.fujitsu.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.cz>
Signed-off-by: default avatarChris Mason <clm@fb.com>
parent 3a7d55c8
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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) {
		/*