]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: Set CIFS_MOUNT_USE_PREFIX_PATH flag on setting cifs_sb->prepath.
authorShyam Prasad N <sprasad@microsoft.com>
Thu, 11 Feb 2021 11:26:54 +0000 (03:26 -0800)
committerSteve French <stfrench@microsoft.com>
Thu, 11 Feb 2021 17:08:32 +0000 (11:08 -0600)
commitceba760b55dbbb00f8390e7616d5daacffb8443c
treeb852c26ae5873c4888bc11739ac4b80833227a93
parent221737fbf2e8ccc318766e1f7e1414c5e5509685
cifs: Set CIFS_MOUNT_USE_PREFIX_PATH flag on setting cifs_sb->prepath.

While debugging another issue today, Steve and I noticed that if a
subdir for a file share is already mounted on the client, any new
mount of any other subdir (or the file share root) of the same share
results in sharing the cifs superblock, which e.g. can result in
incorrect device name.

While setting prefix path for the root of a cifs_sb,
CIFS_MOUNT_USE_PREFIX_PATH flag should also be set.
Without it, prepath is not even considered in some places,
and output of "mount" and various /proc/<>/*mount* related
options can be missing part of the device name.

Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/connect.c