Skip to content

Commit

Permalink
ksmbd: fix3
Browse files Browse the repository at this point in the history
Signed-off-by: Namjae Jeon <[email protected]>
  • Loading branch information
namjaejeon committed Dec 7, 2024
1 parent 607af6a commit cb8b189
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,10 +379,12 @@ int ksmbd_conn_handler_loop(void *p)
kvfree(conn->request_buf);
conn->request_buf = NULL;

if (atomic_inc_return(&conn->req_running) >= max_req) {
recheck:
if (atomic_inc_return(&conn->req_running) > max_req) {
atomic_dec(&conn->req_running);
wait_event_interruptible(conn->req_running_q,
atomic_read(&conn->req_running) < max_req);
atomic_dec(&conn->req_running);
goto recheck;
}

size = t->ops->read(t, hdr_buf, sizeof(hdr_buf), -1);
Expand Down

0 comments on commit cb8b189

Please sign in to comment.