aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/inode.c
diff options
context:
space:
mode:
authorShirish Pargaonkar <shirishpargaonkar@gmail.com>2010-11-27 12:37:26 -0500
committerSteve French <sfrench@us.ibm.com>2010-11-30 00:49:17 -0500
commit78415d2d306bfed0a0ac351aec6c69759d007224 (patch)
tree761fd93aafa6d90f9b3b18af0a4157072190519f /fs/cifs/inode.c
parent523fb8c867650196bef830d5dd9315d9975a9b7e (diff)
cifs: Misc. cleanup in cifsacl handling [try #4]
Change the name of function mode_to_acl to mode_to_cifs_acl. Handle return code in functions mode_to_cifs_acl and cifs_acl_to_fattr. Signed-off-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/inode.c')
-rw-r--r--fs/cifs/inode.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 669298f088da..28cb6e735943 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -689,8 +689,13 @@ int cifs_get_inode_info(struct inode **pinode,
689#ifdef CONFIG_CIFS_EXPERIMENTAL 689#ifdef CONFIG_CIFS_EXPERIMENTAL
690 /* fill in 0777 bits from ACL */ 690 /* fill in 0777 bits from ACL */
691 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) { 691 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) {
692 cFYI(1, "Getting mode bits from ACL"); 692 rc = cifs_acl_to_fattr(cifs_sb, &fattr, *pinode, full_path,
693 cifs_acl_to_fattr(cifs_sb, &fattr, *pinode, full_path, pfid); 693 pfid);
694 if (rc) {
695 cFYI(1, "%s: Getting ACL failed with error: %d",
696 __func__, rc);
697 goto cgii_exit;
698 }
694 } 699 }
695#endif 700#endif
696 701
@@ -2117,9 +2122,14 @@ cifs_setattr_nounix(struct dentry *direntry, struct iattr *attrs)
2117 if (attrs->ia_valid & ATTR_MODE) { 2122 if (attrs->ia_valid & ATTR_MODE) {
2118 rc = 0; 2123 rc = 0;
2119#ifdef CONFIG_CIFS_EXPERIMENTAL 2124#ifdef CONFIG_CIFS_EXPERIMENTAL
2120 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) 2125 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) {
2121 rc = mode_to_acl(inode, full_path, mode); 2126 rc = mode_to_cifs_acl(inode, full_path, mode);
2122 else 2127 if (rc) {
2128 cFYI(1, "%s: Setting ACL failed with error: %d",
2129 __func__, rc);
2130 goto cifs_setattr_exit;
2131 }
2132 } else
2123#endif 2133#endif
2124 if (((mode & S_IWUGO) == 0) && 2134 if (((mode & S_IWUGO) == 0) &&
2125 (cifsInode->cifsAttrs & ATTR_READONLY) == 0) { 2135 (cifsInode->cifsAttrs & ATTR_READONLY) == 0) {