Skip to content

Commit

Permalink
smb/server: fix return value of smb2_open()
Browse files Browse the repository at this point in the history
In most error cases, error code is not returned in smb2_open(),
__process_request() will not print error message.

Fix this by returning the correct value at the end of smb2_open().

Signed-off-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
  • Loading branch information
ChenXiaoSong authored and Steve French committed Aug 22, 2024
1 parent ce61b60 commit 2186a11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/smb/server/smb2pdu.c
Original file line number Diff line number Diff line change
Expand Up @@ -3713,7 +3713,7 @@ int smb2_open(struct ksmbd_work *work)
kfree(name);
kfree(lc);

return 0;
return rc;
}

static int readdir_info_level_struct_sz(int info_level)
Expand Down

0 comments on commit 2186a11

Please sign in to comment.