OSDN Git Service

cifs: fix a credits leak for compund commands
authorRonnie Sahlberg <lsahlber@redhat.com>
Wed, 10 Oct 2018 05:29:06 +0000 (15:29 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2018 19:08:31 +0000 (11:08 -0800)
commitc24f57c61277128022bd7804d9bda9dbbdd56470
treeae371cb74ef0deec62c146fdf47e15402a329bc0
parentc016b6d3c9454a4f6e1cbb69c1fd7730d8108037
cifs: fix a credits leak for compund commands

[ Upstream commit cb5c2e63948451d38c977685fffc06e23beb4517 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/transport.c