diff mbox series

[v2,9/9] smb: client: fix missing mode bits for SMB symlinks

Message ID 20231126025510.28147-10-pc@manguebit.com (mailing list archive)
State New, archived
Headers show
Series reparse points work | expand

Commit Message

Paulo Alcantara Nov. 26, 2023, 2:55 a.m. UTC
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.

Signed-off-by: Paulo Alcantara (SUSE) <pc@manguebit.com>
---
 fs/smb/client/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/fs/smb/client/inode.c b/fs/smb/client/inode.c
index d7d19cdb3c8c..39a08f80735d 100644
--- a/fs/smb/client/inode.c
+++ b/fs/smb/client/inode.c
@@ -791,7 +791,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: