Skip to content

Commit 19e8886

Browse files
Ronnie Sahlbergsmfrench
authored andcommitted
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 <[email protected]> Signed-off-by: Ronnie Sahlberg <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 9ffad92 commit 19e8886

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/cifs/transport.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ wait_for_free_credits(struct TCP_Server_Info *server, const int num_credits,
523523
const int timeout, const int flags,
524524
unsigned int *instance)
525525
{
526-
int rc;
526+
long rc;
527527
int *credits;
528528
int optype;
529529
long int t;

0 commit comments

Comments
 (0)