ksmbd: move credit charge deduction under processing request
authorNamjae Jeon <linkinjeon@kernel.org>
Wed, 29 Dec 2021 14:10:03 +0000 (23:10 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 10:02:53 +0000 (11:02 +0100)
commit0aadd32bebc9506b1fc88ab43c6174c2e371ad7b
tree74a92ff0c4700eb5dbab49e12db57957fbe14f45
parent40fc68aeeb240afb25d7f63bb746f62b8d1f7ec9
ksmbd: move credit charge deduction under processing request

commit 914d7e5709ac59ded70bea7956d408fe2acd7c3c upstream.

Moves the credit charge deduction from total_credits under the processing
a request. When repeating smb2 lock request and other command request,
there will be a problem that ->total_credits does not decrease.

Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ksmbd/smb2misc.c
fs/ksmbd/smb2pdu.c