[CIFS] reset mode when client notices that ATTR_READONLY is no longer set
[deliverable/linux.git] / fs / cifs / inode.c
index 86b9dbbd8441b487c7f496bc95394cf8494845ba..e75a844accd7b5d58060d4d2159730a7650dac96 100644 (file)
@@ -494,6 +494,12 @@ int cifs_get_inode_info(struct inode **pinode,
                           mode e.g. 555 */
                        if (cifsInfo->cifsAttrs & ATTR_READONLY)
                                inode->i_mode &= ~(S_IWUGO);
+                       else if ((inode->i_mode & S_IWUGO) == 0)
+                               /* the ATTR_READONLY flag may have been */
+                               /* changed on server -- set any w bits  */
+                               /* allowed by mnt_file_mode             */
+                               inode->i_mode |= (S_IWUGO &
+                                                 cifs_sb->mnt_file_mode);
                /* BB add code here -
                   validate if device or weird share or device type? */
                }
This page took 0.024399 seconds and 5 git commands to generate.