cifs: fix a credits leak for compund commands
authorRonnie Sahlberg <lsahlber@redhat.com>
Wed, 10 Oct 2018 05:29:06 +0000 (15:29 +1000)
committerSteve French <stfrench@microsoft.com>
Wed, 24 Oct 2018 02:16:04 +0000 (21:16 -0500)
commitcb5c2e63948451d38c977685fffc06e23beb4517
tree6c4a3a239906d5fe2708aefe121b1f5f3bd1163a
parentb340a4d4aa18691a6d8b0e747840b0cf30dc01cb
cifs: fix a credits leak for compund commands

When processing the mids for compounds we would only add credits based on
the last successful mid in the compound which would leak credits and
eventually triggering a re-connect.

Fix this by splitting the mid processing part into two loops instead of one
where the first loop just waits for all mids and then counts how many
credits we were granted for the whole compound.

Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/transport.c