summaryrefslogtreecommitdiffstats
path: root/fs/cifs/readdir.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-22 19:47:09 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-22 19:47:09 -0700
commit12998096cc48563a04ca751965ba17c3f73a5461 (patch)
tree85989e8d7a4d3b80086b70410907ba1bb1c62b14 /fs/cifs/readdir.c
parent37c70d0d09747a958ec50aeb11ed1bf896da028c (diff)
parent066fcb06d3e27c258bc229bb688ced2b16daa6c2 (diff)
downloadkernel-crypto-12998096cc48563a04ca751965ba17c3f73a5461.tar.gz
kernel-crypto-12998096cc48563a04ca751965ba17c3f73a5461.tar.xz
kernel-crypto-12998096cc48563a04ca751965ba17c3f73a5461.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6: [CIFS] Allow reset of file to ATTR_NORMAL when archive bit not set [CIFS] Do not negotiate new POSIX_PATH_OPERATIONS_CAP yet [CIFS] reset mode when client notices that ATTR_READONLY is no longer set
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 44cfb528797..2a374d5215a 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 */