On Sat, Nov 13, 2010 at 10:02 AM, <shirishpargaonkar@xxxxxxxxx> wrote: > From: Shirish Pargaonkar <shirishpargaonkar@xxxxxxxxx> > > 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. > > Pass fid to inode helper function which passes it on to > get inode info function so we do not end up opening the > opened file again thus breaking oplocks. <snip> > @@ -2113,11 +2118,15 @@ cifs_setattr_nounix(struct dentry *direntry, struct iattr *attrs) > } > > if (attrs->ia_valid & ATTR_MODE) { > - rc = 0; > #ifdef CONFIG_CIFS_EXPERIMENTAL > - if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) > - rc = mode_to_acl(inode, full_path, mode); > - else > + if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) { > + rc = mode_to_cifs_acl(inode, full_path, mode); > + if (rc) { > + cFYI(1, "%s: Setting ACL failed with error: %d", > + __func__, rc); > + goto cifs_setattr_exit; > + } > + } > #endif > if (((mode & S_IWUGO) == 0) && > (cifsInode->cifsAttrs & ATTR_READONLY) == 0) { This changes behavior. When you mount with CIFS_ACL then you are still falling through to set the mode bits too (it used to avoid setting the mode bits when we can use ACLs to more accurately represent the mode). You got rid of the else ... Did you mean to do that? Thanks, Steve -- To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html