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.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 59359911f481..b21038b99fc2 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -609,9 +609,8 @@ int cifs_unlink(struct inode *inode, struct dentry *direntry)
609 } 609 }
610 } else if (rc == -EACCES) { 610 } else if (rc == -EACCES) {
611 /* try only if r/o attribute set in local lookup data? */ 611 /* try only if r/o attribute set in local lookup data? */
612 pinfo_buf = kmalloc(sizeof(FILE_BASIC_INFO), GFP_KERNEL); 612 pinfo_buf = kzalloc(sizeof(FILE_BASIC_INFO), GFP_KERNEL);
613 if (pinfo_buf) { 613 if (pinfo_buf) {
614 memset(pinfo_buf, 0, sizeof(FILE_BASIC_INFO));
615 /* ATTRS set to normal clears r/o bit */ 614 /* ATTRS set to normal clears r/o bit */
616 pinfo_buf->Attributes = cpu_to_le32(ATTR_NORMAL); 615 pinfo_buf->Attributes = cpu_to_le32(ATTR_NORMAL);
617 if (!(pTcon->ses->flags & CIFS_SES_NT4)) 616 if (!(pTcon->ses->flags & CIFS_SES_NT4))
@@ -1167,7 +1166,7 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
1167 nfid, npid, FALSE); 1166 nfid, npid, FALSE);
1168 atomic_dec(&open_file->wrtPending); 1167 atomic_dec(&open_file->wrtPending);
1169 cFYI(1,("SetFSize for attrs rc = %d", rc)); 1168 cFYI(1,("SetFSize for attrs rc = %d", rc));
1170 if(rc == -EINVAL) { 1169 if((rc == -EINVAL) || (rc == -EOPNOTSUPP)) {
1171 int bytes_written; 1170 int bytes_written;
1172 rc = CIFSSMBWrite(xid, pTcon, 1171 rc = CIFSSMBWrite(xid, pTcon,
1173 nfid, 0, attrs->ia_size, 1172 nfid, 0, attrs->ia_size,
@@ -1189,7 +1188,7 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
1189 cifs_sb->mnt_cifs_flags & 1188 cifs_sb->mnt_cifs_flags &
1190 CIFS_MOUNT_MAP_SPECIAL_CHR); 1189 CIFS_MOUNT_MAP_SPECIAL_CHR);
1191 cFYI(1, ("SetEOF by path (setattrs) rc = %d", rc)); 1190 cFYI(1, ("SetEOF by path (setattrs) rc = %d", rc));
1192 if(rc == -EINVAL) { 1191 if((rc == -EINVAL) || (rc == -EOPNOTSUPP)) {
1193 __u16 netfid; 1192 __u16 netfid;
1194 int oplock = FALSE; 1193 int oplock = FALSE;
1195 1194