diff options
author | Hyunchul Lee <hyc.lee@gmail.com> | 2021-07-10 16:22:41 +0900 |
---|---|---|
committer | Namjae Jeon <namjae.jeon@samsung.com> | 2021-07-10 16:23:50 +0900 |
commit | d63528eb0d43c4796c42aad56889dec12cf4e122 (patch) | |
tree | fc8f922b3ac71f30c0778d54a0e6bf0ee020b168 /fs/ksmbd/connection.h | |
parent | 4b92841ef27b56883fa4491a3d51db3eef68c481 (diff) | |
download | lwn-d63528eb0d43c4796c42aad56889dec12cf4e122.tar.gz lwn-d63528eb0d43c4796c42aad56889dec12cf4e122.zip |
ksmbd: free ksmbd_lock when file is closed
Append ksmbd_lock into the connection's
lock list and the ksmbd_file's lock list.
And when a file is closed, detach ksmbd_lock
from these lists and free it.
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>
Diffstat (limited to 'fs/ksmbd/connection.h')
-rw-r--r-- | fs/ksmbd/connection.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/ksmbd/connection.h b/fs/ksmbd/connection.h index 98108b41f739..487c2024b0d5 100644 --- a/fs/ksmbd/connection.h +++ b/fs/ksmbd/connection.h @@ -79,6 +79,9 @@ struct ksmbd_conn { char *ntlmssp_cryptkey; }; + spinlock_t llist_lock; + struct list_head lock_list; + struct preauth_integrity_info *preauth_info; bool need_neg; @@ -138,6 +141,9 @@ struct ksmbd_transport { #define KSMBD_TCP_SEND_TIMEOUT (5 * HZ) #define KSMBD_TCP_PEER_SOCKADDR(c) ((struct sockaddr *)&((c)->peer_addr)) +extern struct list_head conn_list; +extern rwlock_t conn_list_lock; + bool ksmbd_conn_alive(struct ksmbd_conn *conn); void ksmbd_conn_wait_idle(struct ksmbd_conn *conn); struct ksmbd_conn *ksmbd_conn_alloc(void); |