diff options
author | Hyunchul Lee <hyc.lee@gmail.com> | 2021-07-10 10:22:41 +0300 |
---|---|---|
committer | Namjae Jeon <namjae.jeon@samsung.com> | 2021-07-10 10:23:50 +0300 |
commit | d63528eb0d43c4796c42aad56889dec12cf4e122 (patch) | |
tree | fc8f922b3ac71f30c0778d54a0e6bf0ee020b168 /fs/ksmbd/vfs_cache.h | |
parent | 4b92841ef27b56883fa4491a3d51db3eef68c481 (diff) | |
download | linux-d63528eb0d43c4796c42aad56889dec12cf4e122.tar.xz |
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/vfs_cache.h')
-rw-r--r-- | fs/ksmbd/vfs_cache.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ksmbd/vfs_cache.h b/fs/ksmbd/vfs_cache.h index 70e987293564..70dfe6a99f13 100644 --- a/fs/ksmbd/vfs_cache.h +++ b/fs/ksmbd/vfs_cache.h @@ -30,7 +30,8 @@ struct ksmbd_session; struct ksmbd_lock { struct file_lock *fl; - struct list_head glist; + struct list_head clist; + struct list_head flist; struct list_head llist; unsigned int flags; int cmd; @@ -91,6 +92,7 @@ struct ksmbd_file { struct stream stream; struct list_head node; struct list_head blocked_works; + struct list_head lock_list; int durable_timeout; |