aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaulo Alcantara <pc@manguebit.com>2023-11-25 23:55:10 -0300
committerSteve French <stfrench@microsoft.com>2023-11-28 20:40:21 -0600
commitef22bb800d967616c7638d204bc1b425beac7f5f (patch)
treed9fcd653f0559a21c16772bf6eac622ddc30e936
parent2cc14f52aeb78ce3f29677c2de1f06c0e91471ab (diff)
downloadlinux-ef22bb800d967616c7638d204bc1b425beac7f5f.tar.gz
smb: client: fix missing mode bits for SMB symlinks
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>
-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 47f49be69ced25..42ef8ca446d0dc 100644
--- a/fs/smb/client/inode.c
+++ b/fs/smb/client/inode.c
@@ -790,7 +790,7 @@ bool cifs_reparse_point_to_fattr(struct cifs_sb_info *cifs_sb,
case 0: /* SMB1 symlink */
case IO_REPARSE_TAG_SYMLINK:
case IO_REPARSE_TAG_NFS:
- fattr->cf_mode = S_IFLNK;
+ fattr->cf_mode = S_IFLNK | cifs_sb->ctx->file_mode;
fattr->cf_dtype = DT_LNK;
break;
default: