aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/cifs/dir.c4
-rw-r--r--fs/cifs/inode.c7
2 files changed, 8 insertions, 3 deletions
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
index f0b5b5f3dd2e..fb69c1fa85c9 100644
--- a/fs/cifs/dir.c
+++ b/fs/cifs/dir.c
@@ -260,7 +260,9 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
260 buf, inode->i_sb, xid, 260 buf, inode->i_sb, xid,
261 &fileHandle); 261 &fileHandle);
262 if (newinode) { 262 if (newinode) {
263 newinode->i_mode = mode; 263 if (cifs_sb->mnt_cifs_flags &
264 CIFS_MOUNT_DYNPERM)
265 newinode->i_mode = mode;
264 if ((oplock & CIFS_CREATE_ACTION) && 266 if ((oplock & CIFS_CREATE_ACTION) &&
265 (cifs_sb->mnt_cifs_flags & 267 (cifs_sb->mnt_cifs_flags &
266 CIFS_MOUNT_SET_UID)) { 268 CIFS_MOUNT_SET_UID)) {
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index ae5bcaf2031c..12667d6bf305 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -1015,8 +1015,11 @@ mkdir_get_info:
1015 CIFS_MOUNT_MAP_SPECIAL_CHR); 1015 CIFS_MOUNT_MAP_SPECIAL_CHR);
1016 } 1016 }
1017 if (direntry->d_inode) { 1017 if (direntry->d_inode) {
1018 direntry->d_inode->i_mode = mode; 1018 if (cifs_sb->mnt_cifs_flags &
1019 direntry->d_inode->i_mode |= S_IFDIR; 1019 CIFS_MOUNT_DYNPERM)
1020 direntry->d_inode->i_mode =
1021 (mode | S_IFDIR);
1022
1020 if (cifs_sb->mnt_cifs_flags & 1023 if (cifs_sb->mnt_cifs_flags &
1021 CIFS_MOUNT_SET_UID) { 1024 CIFS_MOUNT_SET_UID) {
1022 direntry->d_inode->i_uid = 1025 direntry->d_inode->i_uid =