diff options
author | Hyunchul Lee <hyc.lee@gmail.com> | 2021-10-07 16:26:58 +0900 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2021-10-13 23:37:19 -0500 |
commit | bf8acc9e10e21c28452dfa067a7d31e6067104b1 (patch) | |
tree | e1b7e8d3fdd4a7382f85277c7ae354bce1f5689a /fs/ksmbd/connection.c | |
parent | f7db8fd03a4bc5baf70ccf8978fe17cb54368b97 (diff) | |
download | lwn-bf8acc9e10e21c28452dfa067a7d31e6067104b1.tar.gz lwn-bf8acc9e10e21c28452dfa067a7d31e6067104b1.zip |
ksmbd: improve credits management
* Requests except READ, WRITE, IOCTL, INFO, QUERY
DIRECOTRY, CANCEL must consume one credit.
* If client's granted credits are insufficient,
refuse to handle requests.
* Windows server 2016 or later grant up to 8192
credits to clients at once.
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Hyunchul Lee <hyc.lee@gmail.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/ksmbd/connection.c')
-rw-r--r-- | fs/ksmbd/connection.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ksmbd/connection.c b/fs/ksmbd/connection.c index 48b18b4ec117..b57a0d8a392f 100644 --- a/fs/ksmbd/connection.c +++ b/fs/ksmbd/connection.c @@ -61,6 +61,8 @@ struct ksmbd_conn *ksmbd_conn_alloc(void) conn->local_nls = load_nls_default(); atomic_set(&conn->req_running, 0); atomic_set(&conn->r_count, 0); + conn->total_credits = 1; + init_waitqueue_head(&conn->req_running_q); INIT_LIST_HEAD(&conn->conns_list); INIT_LIST_HEAD(&conn->sessions); |