aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/cifsacl.c2
-rw-r--r--fs/cifs/cifsproto.h2
-rw-r--r--fs/cifs/inode.c20
3 files changed, 17 insertions, 7 deletions
diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c
index 91992abc214..c15e3ee730c 100644
--- a/fs/cifs/cifsacl.c
+++ b/fs/cifs/cifsacl.c
@@ -726,7 +726,7 @@ cifs_acl_to_fattr(struct cifs_sb_info *cifs_sb, struct cifs_fattr *fattr,
726} 726}
727 727
728/* Convert mode bits to an ACL so we can update the ACL on the server */ 728/* Convert mode bits to an ACL so we can update the ACL on the server */
729int mode_to_acl(struct inode *inode, const char *path, __u64 nmode) 729int mode_to_cifs_acl(struct inode *inode, const char *path, __u64 nmode)
730{ 730{
731 int rc = 0; 731 int rc = 0;
732 __u32 secdesclen = 0; 732 __u32 secdesclen = 0;
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h
index 6ed59af4520..b498731852d 100644
--- a/fs/cifs/cifsproto.h
+++ b/fs/cifs/cifsproto.h
@@ -133,7 +133,7 @@ extern int cifs_get_inode_info_unix(struct inode **pinode,
133extern int cifs_acl_to_fattr(struct cifs_sb_info *cifs_sb, 133extern int cifs_acl_to_fattr(struct cifs_sb_info *cifs_sb,
134 struct cifs_fattr *fattr, struct inode *inode, 134 struct cifs_fattr *fattr, struct inode *inode,
135 const char *path, const __u16 *pfid); 135 const char *path, const __u16 *pfid);
136extern int mode_to_acl(struct inode *inode, const char *path, __u64); 136extern int mode_to_cifs_acl(struct inode *inode, const char *path, __u64);
137 137
138extern int cifs_mount(struct super_block *, struct cifs_sb_info *, char *, 138extern int cifs_mount(struct super_block *, struct cifs_sb_info *, char *,
139 const char *); 139 const char *);
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 669298f088d..28cb6e73594 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) {