diff options
author | Steve French <stfrench@microsoft.com> | 2021-11-10 03:15:29 -0600 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2021-11-12 13:10:33 -0600 |
commit | 02102744d364c1bca4a0da13c2a72656037f64eb (patch) | |
tree | c57ab72b0244ee414fdf404761ed4f2d15cbc269 /fs/cifs/connect.c | |
parent | 7f28af9cf542f61758b982f8304f951ca99c8f58 (diff) | |
download | linux-02102744d364c1bca4a0da13c2a72656037f64eb.tar.gz |
smb3: do not 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. Also includes an additional check suggested by Paulo
to make sure we don't initialize super cookie twice.
Suggested-by: David Howells <dhowells@redhat.com>
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r-- | fs/cifs/connect.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 5c506f6ecd65..084605f7ce96 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -2350,8 +2350,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: @@ -3003,6 +3001,12 @@ 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. + * Inside cifs_fscache_get_super_cookie it checks + * that we do not get super cookie twice. + */ + cifs_fscache_get_super_cookie(tcon); } /* |