]> 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:30:28 +0000 (15:30 +0200)
commit1424f6132fc8a41c8d21bef1696109c46979be5d
treef5b64b2b19d9ffb3360c61f1e8750a44f7011bc9
parent3c332109173396b03567cf968db96f19eff135e9
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