smb: cached directories can be more than root file handle

[ Upstream commit 128630e1dbec8074c7707aad107299169047e68f ]

Update this log message since cached fids may represent things other
than the root of a mount.

Fixes: e4029e0726 ("cifs: find and use the dentry for cached non-root directories also")
Signed-off-by: Paul Aurich <paul@darkrain42.org>
Reviewed-by: Bharath SM <bharathsm@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Paul Aurich
2024-11-08 14:29:02 -08:00
committed by Greg Kroah-Hartman
parent 07fdc51604
commit cd2a4e32aa

View File

@@ -354,7 +354,7 @@ int open_cached_dir_by_dentry(struct cifs_tcon *tcon,
spin_lock(&cfids->cfid_list_lock); spin_lock(&cfids->cfid_list_lock);
list_for_each_entry(cfid, &cfids->entries, entry) { list_for_each_entry(cfid, &cfids->entries, entry) {
if (dentry && cfid->dentry == dentry) { if (dentry && cfid->dentry == dentry) {
cifs_dbg(FYI, "found a cached root file handle by dentry\n"); cifs_dbg(FYI, "found a cached file handle by dentry\n");
kref_get(&cfid->refcount); kref_get(&cfid->refcount);
*ret_cfid = cfid; *ret_cfid = cfid;
spin_unlock(&cfids->cfid_list_lock); spin_unlock(&cfids->cfid_list_lock);