]> git.baikalelectronics.ru Git - kernel.git/commit
ksmbd: request update to stale share config
authorAtte Heikkilä <atteh.mailbox@gmail.com>
Mon, 8 Aug 2022 22:02:14 +0000 (01:02 +0300)
committerSteve French <stfrench@microsoft.com>
Thu, 11 Aug 2022 06:05:18 +0000 (01:05 -0500)
commit4fb496005fa3ebd369bf286a55bb3901bb204ff7
tree732102c08e923a5dc04caa5ec32db3a29739cedc
parent0556a5cb87a2ef1557c21332d5bfb07289e2c04b
ksmbd: request update to stale share config

ksmbd_share_config_get() retrieves the cached share config as long
as there is at least one connection to the share. This is an issue when
the user space utilities are used to update share configs. In that case
there is a need to inform ksmbd that it should not use the cached share
config for a new connection to the share. With these changes the tree
connection flag KSMBD_TREE_CONN_FLAG_UPDATE indicates this. When this
flag is set, ksmbd removes the share config from the shares hash table
meaning that ksmbd_share_config_get() ends up requesting a share config
from user space.

Signed-off-by: Atte Heikkilä <atteh.mailbox@gmail.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/ksmbd/ksmbd_netlink.h
fs/ksmbd/mgmt/share_config.c
fs/ksmbd/mgmt/share_config.h
fs/ksmbd/mgmt/tree_connect.c
fs/ksmbd/smb2pdu.c