summaryrefslogtreecommitdiff
path: root/fs/smb/client/readdir.c
diff options
context:
space:
mode:
authorPaulo Alcantara <pc@manguebit.com>2023-08-17 18:34:09 +0300
committerSteve French <stfrench@microsoft.com>2023-08-21 00:05:50 +0300
commita18280e7fdea1f2f0736c45f9fee27eccd3998ae (patch)
treea6650aa7c8f70dc1146994a4ff6e01e5806743f9 /fs/smb/client/readdir.c
parentf2762ae4d3e0bceeabfac4bc3c53700d80a602c9 (diff)
downloadlinux-a18280e7fdea1f2f0736c45f9fee27eccd3998ae.tar.xz
smb: cilent: set reparse mount points as automounts
By doing so we can selectively mark those submounts as 'noserverino' rather than whole mount and thus avoiding inode collisions in them. Consider a "test" SMB share that has two mounted NTFS volumes (vol0 & vol1) inside it. * Before patch $ mount.cifs //srv/test /mnt/1 -o ...,serverino $ ls -li /mnt/1/vol0 total 1 281474976710693 drwxr-xr-x 2 root root 0 Jul 15 00:23 $RECYCLE.BIN 281474976710696 drwxr-xr-x 2 root root 0 Jul 18 18:23 System Volume... 281474976710699 -rwxr-xr-x 1 root root 0 Aug 14 21:53 f0 281474976710700 -rwxr-xr-x 1 root root 0 Aug 15 18:52 f2 281474976710698 drwxr-xr-x 2 root root 0 Aug 12 19:39 foo 281474976710692 -rwxr-xr-x 1 root root 5 Aug 4 21:18 vol0_f0.txt $ ls -li /mnt/1/vol1 total 0 281474976710693 drwxr-xr-x 2 root root 0 Jul 15 00:23 $RECYCLE.BIN 281474976710696 drwxr-xr-x 2 root root 0 Jul 18 18:23 System Volume... 281474976710698 drwxr-xr-x 2 root root 0 Aug 12 19:39 bar 281474976710699 -rwxr-xr-x 1 root root 0 Aug 14 22:03 f0 281474976710700 -rwxr-xr-x 1 root root 0 Aug 14 22:52 f1 281474976710692 -rwxr-xr-x 1 root root 0 Jul 15 00:23 vol1_f0.txt * After patch $ mount.cifs //srv/test /mnt/1 -o ...,serverino $ ls -li /mnt/1/vol0 total 1 590 drwxr-xr-x 2 root root 0 Jul 15 00:23 $RECYCLE.BIN 594 drwxr-xr-x 2 root root 0 Jul 18 18:23 System Volume Information 591 -rwxr-xr-x 1 root root 0 Aug 14 21:53 f0 592 -rwxr-xr-x 1 root root 0 Aug 15 18:52 f2 593 drwxr-xr-x 2 root root 0 Aug 12 19:39 foo 595 -rwxr-xr-x 1 root root 5 Aug 4 21:18 vol0_f0.txt $ ls -li /mnt/1/vol1 total 0 596 drwxr-xr-x 2 root root 0 Jul 15 00:23 $RECYCLE.BIN 600 drwxr-xr-x 2 root root 0 Jul 18 18:23 System Volume Information 597 drwxr-xr-x 2 root root 0 Aug 12 19:39 bar 598 -rwxr-xr-x 1 root root 0 Aug 14 22:03 f0 599 -rwxr-xr-x 1 root root 0 Aug 14 22:52 f1 601 -rwxr-xr-x 1 root root 0 Jul 15 00:23 vol1_f0.txt Signed-off-by: Paulo Alcantara (SUSE) <pc@manguebit.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/smb/client/readdir.c')
-rw-r--r--fs/smb/client/readdir.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/smb/client/readdir.c b/fs/smb/client/readdir.c
index 59bf542d5211..47fc22de8d20 100644
--- a/fs/smb/client/readdir.c
+++ b/fs/smb/client/readdir.c
@@ -143,6 +143,7 @@ static bool reparse_file_needs_reval(const struct cifs_fattr *fattr)
case IO_REPARSE_TAG_DFSR:
case IO_REPARSE_TAG_SYMLINK:
case IO_REPARSE_TAG_NFS:
+ case IO_REPARSE_TAG_MOUNT_POINT:
case 0:
return true;
}