cifs: wait_for_free_credits() make it possible to wait for >=1 credits
[linux-2.6-block.git] / fs / cifs / cifsglob.h
index f293e052e351de99e4ebad80cc9805375e5980b4..ddb299494cd66011469a16e09663ce315a2d7423 100644 (file)
@@ -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