From f5c1e2ea71603bc2962041fef9dd902cb8626a1d Mon Sep 17 00:00:00 2001 From: Alan Tyson Date: Sat, 10 Mar 2007 06:05:14 +0000 Subject: [CIFS] reset mode when client notices that ATTR_READONLY is no longer set Signed-off-by: Alan Tyso Signed-off-by: Jeff Layton Signed-off-by: Steve French --- fs/cifs/inode.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'fs/cifs/inode.c') diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index 86b9dbbd844..e75a844accd 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c @@ -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? */ } -- cgit v1.2.3