diff mbox series

[v2,1/4] smb: cached directories can be more than root file handle

Message ID 20241118215028.1066662-2-paul@darkrain42.org (mailing list archive)
State New
Headers show
Series SMB cached directory fixes around reconnection/unmounting | expand

Commit Message

Paul Aurich Nov. 18, 2024, 9:50 p.m. UTC
Update this log message since cached fids may represent things other
than the root of a mount.

Fixes: e4029e072673 ("cifs: find and use the dentry for cached non-root directories also")
Signed-off-by: Paul Aurich <paul@darkrain42.org>
---
 fs/smb/client/cached_dir.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Steve French Nov. 18, 2024, 10:27 p.m. UTC | #1
merged into cifs-2.6.git for-next

On Mon, Nov 18, 2024 at 3:50 PM Paul Aurich <paul@darkrain42.org> wrote:
>
> Update this log message since cached fids may represent things other
> than the root of a mount.
>
> Fixes: e4029e072673 ("cifs: find and use the dentry for cached non-root directories also")
> Signed-off-by: Paul Aurich <paul@darkrain42.org>
> ---
>  fs/smb/client/cached_dir.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/fs/smb/client/cached_dir.c b/fs/smb/client/cached_dir.c
> index 0ff2491c311d..585e1dc72432 100644
> --- a/fs/smb/client/cached_dir.c
> +++ b/fs/smb/client/cached_dir.c
> @@ -399,11 +399,12 @@ int open_cached_dir_by_dentry(struct cifs_tcon *tcon,
>                 return -ENOENT;
>
>         spin_lock(&cfids->cfid_list_lock);
>         list_for_each_entry(cfid, &cfids->entries, entry) {
>                 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 for %pd\n",
> +                                dentry);
>                         kref_get(&cfid->refcount);
>                         *ret_cfid = cfid;
>                         spin_unlock(&cfids->cfid_list_lock);
>                         return 0;
>                 }
> --
> 2.45.2
>
>
diff mbox series

Patch

diff --git a/fs/smb/client/cached_dir.c b/fs/smb/client/cached_dir.c
index 0ff2491c311d..585e1dc72432 100644
--- a/fs/smb/client/cached_dir.c
+++ b/fs/smb/client/cached_dir.c
@@ -399,11 +399,12 @@  int open_cached_dir_by_dentry(struct cifs_tcon *tcon,
 		return -ENOENT;
 
 	spin_lock(&cfids->cfid_list_lock);
 	list_for_each_entry(cfid, &cfids->entries, entry) {
 		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 for %pd\n",
+				 dentry);
 			kref_get(&cfid->refcount);
 			*ret_cfid = cfid;
 			spin_unlock(&cfids->cfid_list_lock);
 			return 0;
 		}