]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
smb/server: fix return value of smb2_query_dir()
authorChenXiaoSong <chenxiaosong@kylinos.cn>
Fri, 17 Oct 2025 10:46:09 +0000 (18:46 +0800)
committerSteve French <stfrench@microsoft.com>
Mon, 1 Dec 2025 03:11:43 +0000 (21:11 -0600)
__process_request() will not print error messages if smb2_query_dir()
always returns 0.

Fix this by returning the correct value at the end of function.

Signed-off-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/server/smb2pdu.c

index d676558f7bb62667283659ae195a5523c9e2308d..a3b7b648227ac0982d2085b673c117c493c89001 100644 (file)
@@ -4550,7 +4550,7 @@ err_out2:
        smb2_set_err_rsp(work);
        ksmbd_fd_put(work, dir_fp);
        ksmbd_revert_fsids(work);
-       return 0;
+       return rc;
 }
 
 /**