]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
smb: client: update cfid->last_access_time in open_cached_dir_by_dentry()
authorHenrique Carvalho <henrique.carvalho@suse.com>
Fri, 19 Sep 2025 01:41:58 +0000 (22:41 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Nov 2025 20:37:34 +0000 (15:37 -0500)
[ Upstream commit 5676398315b73f21d6a4e2d36606ce94e8afc79e ]

open_cached_dir_by_dentry() was missing an update of
cfid->last_access_time to jiffies, similar to what open_cached_dir()
has.

Add it to the function.

Signed-off-by: Henrique Carvalho <henrique.carvalho@suse.com>
Reviewed-by: Enzo Matsumiya <ematsumiya@suse.de>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/smb/client/cached_dir.c

index b69daeb1301b3c801c7c122d138f622882da40a1..cc857a030a778d2c3ac342f11f03f9392e264f13 100644 (file)
@@ -423,6 +423,7 @@ int open_cached_dir_by_dentry(struct cifs_tcon *tcon,
                        cifs_dbg(FYI, "found a cached file handle by dentry\n");
                        kref_get(&cfid->refcount);
                        *ret_cfid = cfid;
+                       cfid->last_access_time = jiffies;
                        spin_unlock(&cfids->cfid_list_lock);
                        return 0;
                }