summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorPaulo Alcantara <pc@manguebit.com>2023-11-25 23:55:10 -0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-01-10 17:10:32 +0100
commite88275ce7e7ba641d9c1c5df8ffe344e698507fd (patch)
treee56dba8e6bf886929aa063570ffae9d5cd40bb44 /fs
parentbf223fd4d914f8d7877b5f13a03477cc7542cc25 (diff)
downloadlinux-e88275ce7e7ba641d9c1c5df8ffe344e698507fd.tar.gz
linux-e88275ce7e7ba641d9c1c5df8ffe344e698507fd.tar.bz2
linux-e88275ce7e7ba641d9c1c5df8ffe344e698507fd.zip
smb: client: fix missing mode bits for SMB symlinks
[ Upstream commit ef22bb800d967616c7638d204bc1b425beac7f5f ] When instantiating inodes for SMB symlinks, add the mode bits from @cifs_sb->ctx->file_mode as we already do for the other special files. Cc: stable@vger.kernel.org Signed-off-by: Paulo Alcantara (SUSE) <pc@manguebit.com> Signed-off-by: Steve French <stfrench@microsoft.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/smb/client/inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/smb/client/inode.c b/fs/smb/client/inode.c
index 7be51f9d2fa1..5343898bac8a 100644
--- a/fs/smb/client/inode.c
+++ b/fs/smb/client/inode.c
@@ -264,7 +264,7 @@ cifs_unix_basic_to_fattr(struct cifs_fattr *fattr, FILE_UNIX_BASIC_INFO *info,
fattr->cf_dtype = DT_REG;
break;
case UNIX_SYMLINK:
- fattr->cf_mode |= S_IFLNK;
+ fattr->cf_mode |= S_IFLNK | cifs_sb->ctx->file_mode;
fattr->cf_dtype = DT_LNK;
break;
case UNIX_DIR: