ksmbd: fix the running request count decrement
authorHyunchul Lee <hyc.lee@gmail.com>
Sat, 10 Jul 2021 00:31:08 +0000 (09:31 +0900)
committerNamjae Jeon <namjae.jeon@samsung.com>
Sat, 10 Jul 2021 00:40:26 +0000 (09:40 +0900)
decrement the count of running requests after
sending the last response for multi-response
requests.

Signed-off-by: Hyunchul Lee <hyc.lee@gmail.com>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/ksmbd/connection.c

index 928e22e..6e51e08 100644 (file)
@@ -120,7 +120,8 @@ int ksmbd_conn_try_dequeue_request(struct ksmbd_work *work)
            list_empty(&work->async_request_entry))
                return 0;
 
-       atomic_dec(&conn->req_running);
+       if (!work->multiRsp)
+               atomic_dec(&conn->req_running);
        spin_lock(&conn->request_lock);
        if (!work->multiRsp) {
                list_del_init(&work->request_entry);