Skip to content

Commit 01ec372

Browse files
Ronnie SahlbergSteve French
authored andcommitted
cifs: fix DFS mount with cifsacl/modefromsid
RHBZ: 1871246 If during cifs_lookup()/get_inode_info() we encounter a DFS link and we use the cifsacl or modefromsid mount options we must suppress any -EREMOTE errors that triggers or else we will not be able to follow the DFS link and automount the target. This fixes an issue with modefromsid/cifsacl where these mountoptions would break DFS and we would no longer be able to access the share. Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com> Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz> Signed-off-by: Steve French <stfrench@microsoft.com>
1 parent f4d51df commit 01ec372

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

fs/cifs/inode.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1017,6 +1017,8 @@ cifs_get_inode_info(struct inode **inode,
10171017
if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MODE_FROM_SID) {
10181018
rc = cifs_acl_to_fattr(cifs_sb, &fattr, *inode, true,
10191019
full_path, fid);
1020+
if (rc == -EREMOTE)
1021+
rc = 0;
10201022
if (rc) {
10211023
cifs_dbg(FYI, "%s: Get mode from SID failed. rc=%d\n",
10221024
__func__, rc);
@@ -1025,6 +1027,8 @@ cifs_get_inode_info(struct inode **inode,
10251027
} else if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) {
10261028
rc = cifs_acl_to_fattr(cifs_sb, &fattr, *inode, false,
10271029
full_path, fid);
1030+
if (rc == -EREMOTE)
1031+
rc = 0;
10281032
if (rc) {
10291033
cifs_dbg(FYI, "%s: Getting ACL failed with error: %d\n",
10301034
__func__, rc);

0 commit comments

Comments
 (0)