aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/readdir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/readdir.c')
-rw-r--r--fs/cifs/readdir.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c
index 44cfb528797d..2a374d5215ab 100644
--- a/fs/cifs/readdir.c
+++ b/fs/cifs/readdir.c
@@ -219,6 +219,10 @@ static void fill_in_inode(struct inode *tmp_inode, int new_buf_type,
219 tmp_inode->i_mode |= S_IFREG; 219 tmp_inode->i_mode |= S_IFREG;
220 if (attr & ATTR_READONLY) 220 if (attr & ATTR_READONLY)
221 tmp_inode->i_mode &= ~(S_IWUGO); 221 tmp_inode->i_mode &= ~(S_IWUGO);
222 else if ((tmp_inode->i_mode & S_IWUGO) == 0)
223 /* the ATTR_READONLY flag may have been changed on */
224 /* server -- set any w bits allowed by mnt_file_mode */
225 tmp_inode->i_mode |= (S_IWUGO & cifs_sb->mnt_file_mode);
222 } /* could add code here - to validate if device or weird share type? */ 226 } /* could add code here - to validate if device or weird share type? */
223 227
224 /* can not fill in nlink here as in qpathinfo version and Unx search */ 228 /* can not fill in nlink here as in qpathinfo version and Unx search */