Merge tag 'io_uring-5.15-2021-09-25' of git://git.kernel.dk/linux-block
[platform/kernel/linux-starfive.git] / fs / cifs / connect.c
index 7881115..c3b94c1 100644 (file)
@@ -2389,9 +2389,10 @@ cifs_match_super(struct super_block *sb, void *data)
        spin_lock(&cifs_tcp_ses_lock);
        cifs_sb = CIFS_SB(sb);
        tlink = cifs_get_tlink(cifs_sb_master_tlink(cifs_sb));
-       if (IS_ERR(tlink)) {
+       if (tlink == NULL) {
+               /* can not match superblock if tlink were ever null */
                spin_unlock(&cifs_tcp_ses_lock);
-               return rc;
+               return 0;
        }
        tcon = tlink_tcon(tlink);
        ses = tcon->ses;