NFSD: pass range end to vfs_fsync_range() instead of count
authorBrian Foster <bfoster@redhat.com>
Wed, 16 Nov 2022 15:28:36 +0000 (10:28 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:32:00 +0000 (13:32 +0100)
commitb6dccca21b1fd481a6ba2a3cb3defa7c09c23343
tree02c44b9944c20a358969e77635db09844017662d
parent82474db85baba1fdcbef9487c88d64f2172c23cf
NFSD: pass range end to vfs_fsync_range() instead of count

[ Upstream commit 79a1d88a36f77374c77fd41a4386d8c2736b8704 ]

_nfsd_copy_file_range() calls vfs_fsync_range() with an offset and
count (bytes written), but the former wants the start and end bytes
of the range to sync. Fix it up.

Fixes: eac0b17a77fb ("NFSD add vfs_fsync after async copy is done")
Signed-off-by: Brian Foster <bfoster@redhat.com>
Tested-by: Dai Ngo <dai.ngo@oracle.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfsd/nfs4proc.c