Skip to content

Commit b365b9d

Browse files
author
Steve French
committed
smb311 client: fix missing tcon check when mounting with linux/posix extensions
When mounting the same share twice, once with the "linux" mount parameter (or equivalently "posix") and then once without (or e.g. with "nolinux"), we were incorrectly reusing the same tree connection for both mounts. This meant that the first mount of the share on the client, would cause subsequent mounts of that same share on the same client to ignore that mount parm ("linux" vs. "nolinux") and incorrectly reuse the same tcon. Cc: stable@vger.kernel.org Signed-off-by: Steve French <stfrench@microsoft.com>
1 parent 6f8a394 commit b365b9d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fs/smb/client/connect.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2556,6 +2556,8 @@ static int match_tcon(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)
25562556
return 0;
25572557
if (tcon->nodelete != ctx->nodelete)
25582558
return 0;
2559+
if (tcon->posix_extensions != ctx->linux_ext)
2560+
return 0;
25592561
return 1;
25602562
}
25612563

0 commit comments

Comments
 (0)