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.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 9c6a40f5cc5..b95f4a5af01 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -1796,14 +1796,12 @@ cifs_setattr_unix(struct dentry *direntry, struct iattr *attrs)
1796 1796
1797 xid = GetXid(); 1797 xid = GetXid();
1798 1798
1799 if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_PERM) == 0) { 1799 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_PERM)
1800 /* check if we have permission to change attrs */ 1800 attrs->ia_valid |= ATTR_FORCE;
1801 rc = inode_change_ok(inode, attrs); 1801
1802 if (rc < 0) 1802 rc = inode_change_ok(inode, attrs);
1803 goto out; 1803 if (rc < 0)
1804 else 1804 goto out;
1805 rc = 0;
1806 }
1807 1805
1808 full_path = build_path_from_dentry(direntry); 1806 full_path = build_path_from_dentry(direntry);
1809 if (full_path == NULL) { 1807 if (full_path == NULL) {
@@ -1934,14 +1932,13 @@ cifs_setattr_nounix(struct dentry *direntry, struct iattr *attrs)
1934 cFYI(1, "setattr on file %s attrs->iavalid 0x%x", 1932 cFYI(1, "setattr on file %s attrs->iavalid 0x%x",
1935 direntry->d_name.name, attrs->ia_valid); 1933 direntry->d_name.name, attrs->ia_valid);
1936 1934
1937 if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_PERM) == 0) { 1935 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_PERM)
1938 /* check if we have permission to change attrs */ 1936 attrs->ia_valid |= ATTR_FORCE;
1939 rc = inode_change_ok(inode, attrs); 1937
1940 if (rc < 0) { 1938 rc = inode_change_ok(inode, attrs);
1941 FreeXid(xid); 1939 if (rc < 0) {
1942 return rc; 1940 FreeXid(xid);
1943 } else 1941 return rc;
1944 rc = 0;
1945 } 1942 }
1946 1943
1947 full_path = build_path_from_dentry(direntry); 1944 full_path = build_path_from_dentry(direntry);