]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cifs: Fix duplicate fscache cookie warnings
authorDavid Howells <dhowells@redhat.com>
Wed, 27 Mar 2024 14:13:24 +0000 (14:13 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Apr 2024 14:35:43 +0000 (16:35 +0200)
commit614bc8c71ed5ae9ffdc89886003d20afbf20e86c
treed69fbc9bcb184a56682301b50f2c1cffde30fe18
parent3f0784b2f1eb9147973d8c43ba085c5fdf44ff69
cifs: Fix duplicate fscache cookie warnings

[ Upstream commit 8876a37277cb832e1861c35f8c661825179f73f5 ]

fscache emits a lot of duplicate cookie warnings with cifs because the
index key for the fscache cookies does not include everything that the
cifs_find_inode() function does.  The latter is used with iget5_locked() to
distinguish between inodes in the local inode cache.

Fix this by adding the creation time and file type to the fscache cookie
key.

Additionally, add a couple of comments to note that if one is changed the
other must be also.

Signed-off-by: David Howells <dhowells@redhat.com>
Fixes: 70431bfd825d ("cifs: Support fscache indexing rewrite")
cc: Shyam Prasad N <nspmangalore@gmail.com>
cc: Rohith Surabattula <rohiths.msft@gmail.com>
cc: Jeff Layton <jlayton@kernel.org>
cc: linux-cifs@vger.kernel.org
cc: netfs@lists.linux.dev
cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/smb/client/fscache.c
fs/smb/client/inode.c