diff options
author | Namjae Jeon <linkinjeon@kernel.org> | 2022-07-22 03:15:10 +0200 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2022-07-27 06:38:05 +0200 |
commit | e4d3e6b524c0c928f7fc9e03e047885c4951ae60 (patch) | |
tree | 336f75e8301d0be3c91125992a99a5a74e03fe77 /fs/ksmbd/connection.c | |
parent | MAINTAINERS: ksmbd: add entry for documentation (diff) | |
download | linux-e4d3e6b524c0c928f7fc9e03e047885c4951ae60.tar.xz linux-e4d3e6b524c0c928f7fc9e03e047885c4951ae60.zip |
ksmbd: replace sessions list in connection with xarray
Replace sessions list in connection with xarray.
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Reviewed-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 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ksmbd/connection.c b/fs/ksmbd/connection.c index e8f476c5f189..ce23cc89046e 100644 --- a/fs/ksmbd/connection.c +++ b/fs/ksmbd/connection.c @@ -36,6 +36,7 @@ void ksmbd_conn_free(struct ksmbd_conn *conn) list_del(&conn->conns_list); write_unlock(&conn_list_lock); + xa_destroy(&conn->sessions); kvfree(conn->request_buf); kfree(conn->preauth_info); kfree(conn); @@ -66,12 +67,12 @@ struct ksmbd_conn *ksmbd_conn_alloc(void) init_waitqueue_head(&conn->req_running_q); INIT_LIST_HEAD(&conn->conns_list); - INIT_LIST_HEAD(&conn->sessions); INIT_LIST_HEAD(&conn->requests); INIT_LIST_HEAD(&conn->async_requests); spin_lock_init(&conn->request_lock); spin_lock_init(&conn->credits_lock); ida_init(&conn->async_ida); + xa_init(&conn->sessions); spin_lock_init(&conn->llist_lock); INIT_LIST_HEAD(&conn->lock_list); |