ksmbd: separately allocate ci per dentry
authorNamjae Jeon <linkinjeon@kernel.org>
Sun, 31 Dec 2023 07:19:09 +0000 (16:19 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Jan 2024 14:19:39 +0000 (15:19 +0100)
commitf263652dc6c95d973dcd97ec4bcc9b2c66471a3e
tree34a4f50d5380d6c2b21c090c9fc6942a92993e05
parent8d69547b94e079a61e43d017f92ecc86256b1eea
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: Sasha Levin <sashal@kernel.org>
fs/smb/server/smb2pdu.c
fs/smb/server/vfs.c
fs/smb/server/vfs_cache.c
fs/smb/server/vfs_cache.h