summaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsglob.h
diff options
context:
space:
mode:
authorRonnie Sahlberg <lsahlber@redhat.com>2019-03-08 12:58:20 +1000
committerSteve French <stfrench@microsoft.com>2019-03-14 19:32:35 -0500
commitb227d215deef4f3528b8f754accef4db03539a59 (patch)
tree99fafcb617c74ccb739dd290be960723091142b2 /fs/cifs/cifsglob.h
parent4230cff8c0b7aaee7203e434b05a9acc1635fc04 (diff)
downloadlinux-b227d215deef4f3528b8f754accef4db03539a59.tar.bz2
cifs: wait_for_free_credits() make it possible to wait for >=1 credits
Change wait_for_free_credits() to allow waiting for >=1 credits instead of just a single credit. Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com> Signed-off-by: Steve French <stfrench@microsoft.com> Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
Diffstat (limited to 'fs/cifs/cifsglob.h')
-rw-r--r--fs/cifs/cifsglob.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index f293e052e351..ddb299494cd6 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -735,13 +735,13 @@ in_flight(struct TCP_Server_Info *server)
}
static inline bool
-has_credits(struct TCP_Server_Info *server, int *credits)
+has_credits(struct TCP_Server_Info *server, int *credits, int num_credits)
{
int num;
spin_lock(&server->req_lock);
num = *credits;
spin_unlock(&server->req_lock);
- return num > 0;
+ return num >= num_credits;
}
static inline void