cifs: fix DFS mount with cifsacl/modefromsid
authorRonnie Sahlberg <lsahlber@redhat.com>
Thu, 3 Sep 2020 00:02:39 +0000 (10:02 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Sep 2020 10:59:51 +0000 (12:59 +0200)
commitc1da3b82db73d449c8a6d21df2d6beb5b6e01bd7
tree2ccadc9134de18bf9ea96e12eaaa683035febff8
parentd28c42ad89581d4f88c09124ab77a0baef0f949e
cifs: fix DFS mount with cifsacl/modefromsid

[ Upstream commit 01ec372cef1e5afa4ab843bbaf88a6fcb64dc14c ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/cifs/inode.c