]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ksmbd: request update to stale share config
authorAtte Heikkilä <atteh.mailbox@gmail.com>
Mon, 18 Dec 2023 15:33:06 +0000 (00:33 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Dec 2023 09:41:52 +0000 (10:41 +0100)
commitebb8c616574adf715093f2fcdbd7afe54c4481a1
treea644119738fb3a080186f9ccdcbc1adae7cb80ae
parentc7aff8b8ffdb70e1bfd2be9f122f410c20ff6af1
ksmbd: request update to stale share config

[ Upstream commit 4963d74f8a6cc0eafd71d9ffc13e3a11ff1dd160 ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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