]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ksmbd: separately allocate ci per dentry
authorNamjae Jeon <linkinjeon@kernel.org>
Mon, 18 Dec 2023 15:34:50 +0000 (00:34 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Dec 2023 09:41:59 +0000 (10:41 +0100)
commit772d81aeecd32f7993a8eba870102484c5c8368d
tree567bab62d94bf975f89b010ed31ddc6ad72e3c84
parent8ed1118da8c4905783a5f68657b451975ef3c7a5
ksmbd: separately allocate ci per dentry

[ Upstream commit 4274a9dc6aeb9fea66bffba15697a35ae8983b6a ]

xfstests generic/002 test fail when enabling smb2 leases feature.
This test create hard link file, but removeal failed.
ci has a file open count to count file open through the smb client,
but in the case of hard link files, The allocation of ci per inode
cause incorrectly open count for file deletion. This patch allocate
ci per dentry to counts open counts for hard link.

Signed-off-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/smb2pdu.c
fs/ksmbd/vfs.c
fs/ksmbd/vfs_cache.c
fs/ksmbd/vfs_cache.h