From: Jeff Date: Thu, 13 Sep 2007 18:38:50 +0000 (+0000) Subject: [CIFS] Respect umask when using POSIX mkdir X-Git-Tag: firefly_0821_release~24754^2~40 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a8cd925f74c3b1b6d1192f9e75f9d12cc2ab148a;p=firefly-linux-kernel-4.4.55.git [CIFS] Respect umask when using POSIX mkdir When making a directory with POSIX mkdir calls, cifs_mkdir does not respect the umask. This patch causes the new POSIX mkdir to create with the right mode Signed-off-by: Jeff Layton Signed-off-by: Steve French --- diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index 66436f527c3b..e800c0ef54f6 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c @@ -919,6 +919,7 @@ int cifs_mkdir(struct inode *inode, struct dentry *direntry, int mode) goto mkdir_out; } + mode &= ~current->fs->umask; rc = CIFSPOSIXCreate(xid, pTcon, SMB_O_DIRECTORY | SMB_O_CREAT, mode, NULL /* netfid */, pInfo, &oplock, full_path, cifs_sb->local_nls,