diff options
author | Alan Tyson <atyson@hp.com> | 2007-03-10 07:05:14 +0100 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2007-03-10 07:05:14 +0100 |
commit | f5c1e2ea71603bc2962041fef9dd902cb8626a1d (patch) | |
tree | 506df04849d84bbc9094a878f29123bb8e342cd1 /fs/cifs/readdir.c | |
parent | Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 (diff) | |
download | linux-f5c1e2ea71603bc2962041fef9dd902cb8626a1d.tar.xz linux-f5c1e2ea71603bc2962041fef9dd902cb8626a1d.zip |
[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/readdir.c')
-rw-r--r-- | fs/cifs/readdir.c | 4 |
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, tmp_inode->i_mode |= S_IFREG; if (attr & ATTR_READONLY) tmp_inode->i_mode &= ~(S_IWUGO); + else if ((tmp_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 */ + tmp_inode->i_mode |= (S_IWUGO & cifs_sb->mnt_file_mode); } /* could add code here - to validate if device or weird share type? */ /* can not fill in nlink here as in qpathinfo version and Unx search */ |