aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/inode.c
diff options
context:
space:
mode:
authorAlan Tyson <atyson@hp.com>2007-03-10 01:05:14 -0500
committerSteve French <sfrench@us.ibm.com>2007-03-10 01:05:14 -0500
commitf5c1e2ea71603bc2962041fef9dd902cb8626a1d (patch)
tree506df04849d84bbc9094a878f29123bb8e342cd1 /fs/cifs/inode.c
parenteee8abe5de9cbd936b51db292c8d3c406b0e79e7 (diff)
[CIFS] reset mode when client notices that ATTR_READONLY is no longer set
Signed-off-by: Alan Tyso <atyson@hp.com> Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/inode.c')
-rw-r--r--fs/cifs/inode.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 86b9dbbd8441..e75a844accd7 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -494,6 +494,12 @@ int cifs_get_inode_info(struct inode **pinode,
494 mode e.g. 555 */ 494 mode e.g. 555 */
495 if (cifsInfo->cifsAttrs & ATTR_READONLY) 495 if (cifsInfo->cifsAttrs & ATTR_READONLY)
496 inode->i_mode &= ~(S_IWUGO); 496 inode->i_mode &= ~(S_IWUGO);
497 else if ((inode->i_mode & S_IWUGO) == 0)
498 /* the ATTR_READONLY flag may have been */
499 /* changed on server -- set any w bits */
500 /* allowed by mnt_file_mode */
501 inode->i_mode |= (S_IWUGO &
502 cifs_sb->mnt_file_mode);
497 /* BB add code here - 503 /* BB add code here -
498 validate if device or weird share or device type? */ 504 validate if device or weird share or device type? */
499 } 505 }