]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
smb3 client: fix return code mapping of remap_file_range
authorSteve French <stfrench@microsoft.com>
Sun, 24 Aug 2025 02:15:59 +0000 (21:15 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Sep 2025 13:26:30 +0000 (15:26 +0200)
commitb0165b6ead387c4d4fea97b73bec2da73177ff2b
treeb2646a98188b35334f0d8046b2ca1fd54d305620
parent4a65998543efdac67a92fdb95c85d6e9ff71d46d
smb3 client: fix return code mapping of remap_file_range

commit 0e08fa789d39aa01923e3ba144bd808291895c3c upstream.

We were returning -EOPNOTSUPP for various remap_file_range cases
but for some of these the copy_file_range_syscall() requires -EINVAL
to be returned (e.g. where source and target file ranges overlap when
source and target are the same file). This fixes xfstest generic/157
which was expecting EINVAL for that (and also e.g. for when the src
offset is beyond end of file).

Cc: stable@vger.kernel.org
Acked-by: Paulo Alcantara (Red Hat) <pc@manguebit.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/smb/client/cifsfs.c