mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-25 12:00:22 +09:00
ksmbd: Fix unsigned expression compared with zero
[ Upstream commit 0266a2f791 ]
The return value of the ksmbd_vfs_getcasexattr() is signed.
However, the return value is being assigned to an unsigned
variable and subsequently recasted, causing warnings. Use
a signed type.
Signed-off-by: Wang Ming <machel@vivo.com>
Acked-by: Tom Talpey <tom@talpey.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
5f36e22910
commit
cf63b94fec
@@ -412,7 +412,8 @@ static int ksmbd_vfs_stream_write(struct ksmbd_file *fp, char *buf, loff_t *pos,
|
||||
{
|
||||
char *stream_buf = NULL, *wbuf;
|
||||
struct user_namespace *user_ns = file_mnt_user_ns(fp->filp);
|
||||
size_t size, v_len;
|
||||
size_t size;
|
||||
ssize_t v_len;
|
||||
int err = 0;
|
||||
|
||||
ksmbd_debug(VFS, "write stream data pos : %llu, count : %zd\n",
|
||||
@@ -429,9 +430,9 @@ static int ksmbd_vfs_stream_write(struct ksmbd_file *fp, char *buf, loff_t *pos,
|
||||
fp->stream.name,
|
||||
fp->stream.size,
|
||||
&stream_buf);
|
||||
if ((int)v_len < 0) {
|
||||
if (v_len < 0) {
|
||||
pr_err("not found stream in xattr : %zd\n", v_len);
|
||||
err = (int)v_len;
|
||||
err = v_len;
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user