Skip to content

Commit ef22bb8

Browse files
Paulo AlcantaraSteve French
authored andcommitted
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>
1 parent 2cc14f5 commit ef22bb8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/smb/client/inode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,7 @@ bool cifs_reparse_point_to_fattr(struct cifs_sb_info *cifs_sb,
790790
case 0: /* SMB1 symlink */
791791
case IO_REPARSE_TAG_SYMLINK:
792792
case IO_REPARSE_TAG_NFS:
793-
fattr->cf_mode = S_IFLNK;
793+
fattr->cf_mode = S_IFLNK | cifs_sb->ctx->file_mode;
794794
fattr->cf_dtype = DT_LNK;
795795
break;
796796
default:

0 commit comments

Comments
 (0)