With this patch now that the fscache cookie is initialized properly - I do see an oops on the 2nd unmount if we mount the same share twice ... any ideas on fixing that? smb3: do not call setup the fscache_super_cookie until fsinfo initialized We were calling cifs_fscache_get_super_cookie after tcon but before we queried the info (QFS_Info) we need to initialize the cookie properly. Suggested-by: David Howells <dhowells@xxxxxxxxxx> Signed-off-by: Steve French <stfrench@xxxxxxxxxxxxx> -- Thanks, Steve
From 090f51ab455dee249a4bc13428f964bd7e848956 Mon Sep 17 00:00:00 2001 From: Steve French <stfrench@xxxxxxxxxxxxx> Date: Wed, 10 Nov 2021 03:15:29 -0600 Subject: [PATCH] smb3: do not call setup the fscache_super_cookie until fsinfo initialized We were calling cifs_fscache_get_super_cookie after tcon but before we queried the info (QFS_Info) we need to initialize the cookie properly. Suggested-by: David Howells <dhowells@xxxxxxxxxx> Signed-off-by: Steve French <stfrench@xxxxxxxxxxxxx> --- fs/cifs/connect.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index f645f994a523..186c953c47ec 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -2349,8 +2349,6 @@ cifs_get_tcon(struct cifs_ses *ses, struct smb3_fs_context *ctx) list_add(&tcon->tcon_list, &ses->tcon_list); spin_unlock(&cifs_tcp_ses_lock); - cifs_fscache_get_super_cookie(tcon); - return tcon; out_fail: @@ -3002,6 +3000,8 @@ static int mount_get_conns(struct mount_ctx *mnt_ctx) cifs_dbg(VFS, "read only mount of RW share\n"); /* no need to log a RW mount of a typical RW share */ } + /* The cookie is initialized from volume info returned above */ + cifs_fscache_get_super_cookie(tcon); } /* -- 2.32.0