summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorRonnie Sahlberg <lsahlber@redhat.com>2020-07-02 02:55:41 +0200
committerSteve French <stfrench@microsoft.com>2020-07-02 03:01:26 +0200
commit19e888678bac8c82206eb915eaf72741b2a2615c (patch)
tree440458195001f15b8332ab4823def91f29c7e35a /fs
parentcifs: Fix the target file was deleted when rename failed. (diff)
downloadlinux-19e888678bac8c82206eb915eaf72741b2a2615c.tar.xz
linux-19e888678bac8c82206eb915eaf72741b2a2615c.zip
cifs: prevent truncation from long to int in wait_for_free_credits
The wait_event_... defines evaluate to long so we should not assign it an int as this may truncate the value. Reported-by: Marshall Midden <marshallmidden@gmail.com> Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/transport.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
index d11e31064679..84433d0653f9 100644
--- a/fs/cifs/transport.c
+++ b/fs/cifs/transport.c
@@ -523,7 +523,7 @@ wait_for_free_credits(struct TCP_Server_Info *server, const int num_credits,
const int timeout, const int flags,
unsigned int *instance)
{
- int rc;
+ long rc;
int *credits;
int optype;
long int t;