aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/inode.c')
-rw-r--r--fs/cifs/inode.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index f414526e476a..eeea33752e68 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -1339,17 +1339,17 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
1339 cpu_to_le32(cifsInode->cifsAttrs | 1339 cpu_to_le32(cifsInode->cifsAttrs |
1340 ATTR_READONLY); 1340 ATTR_READONLY);
1341 } 1341 }
1342 } else if ((mode & S_IWUGO) == S_IWUGO) { 1342 } else if (cifsInode->cifsAttrs & ATTR_READONLY) {
1343 if (cifsInode->cifsAttrs & ATTR_READONLY) { 1343 /* If file is readonly on server, we would
1344 set_dosattr = TRUE; 1344 not be able to write to it - so if any write
1345 time_buf.Attributes = 1345 bit is enabled for user or group or other we
1346 cpu_to_le32(cifsInode->cifsAttrs & 1346 need to at least try to remove r/o dos attr */
1347 (~ATTR_READONLY)); 1347 set_dosattr = TRUE;
1348 /* Windows ignores set to zero */ 1348 time_buf.Attributes = cpu_to_le32(cifsInode->cifsAttrs &
1349 if(time_buf.Attributes == 0) 1349 (~ATTR_READONLY));
1350 time_buf.Attributes |= 1350 /* Windows ignores set to zero */
1351 cpu_to_le32(ATTR_NORMAL); 1351 if(time_buf.Attributes == 0)
1352 } 1352 time_buf.Attributes |= cpu_to_le32(ATTR_NORMAL);
1353 } 1353 }
1354 /* BB to be implemented - 1354 /* BB to be implemented -
1355 via Windows security descriptors or streams */ 1355 via Windows security descriptors or streams */