cifs: prevent starvation in wait_for_free_credits for multi-credit requests
Reserve the last MAX_COMPOUND credits for any request asking for >1 credit.
This is to prevent future compound requests from becoming starved while waiting
for potentially many requests is there is a large number of concurrent
However, we need to protect from servers that are very slow to hand out
new credits on new sessions so we only do this IFF there are 2*MAX_COMPOUND
(arbitrary) credits already in flight.
Signed-off-by: Ronnie Sahlberg <email@example.com>
Signed-off-by: Steve French <firstname.lastname@example.org>
Reviewed-by: Pavel Shilovsky <email@example.com>
1 file changed