X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=fs%2Fext2%2Facl.c;h=e58669e1b87c6bab0e0a0ac8677713b5b2f3fbb8;hb=852e1f2a2627274102a3c2dc70a6547aeab99cb6;hp=da52b4a5db64005173124575e63161ed1d6c3d35;hpb=2ade43618b0aee83a50b344171d33d85c73d01b1;p=linux-2.6 diff --git a/fs/ext2/acl.c b/fs/ext2/acl.c index da52b4a5db..e58669e1b8 100644 --- a/fs/ext2/acl.c +++ b/fs/ext2/acl.c @@ -89,8 +89,8 @@ ext2_acl_to_disk(const struct posix_acl *acl, size_t *size) size_t n; *size = ext2_acl_size(acl->a_count); - ext_acl = (ext2_acl_header *)kmalloc(sizeof(ext2_acl_header) + - acl->a_count * sizeof(ext2_acl_entry), GFP_KERNEL); + ext_acl = kmalloc(sizeof(ext2_acl_header) + acl->a_count * + sizeof(ext2_acl_entry), GFP_KERNEL); if (!ext_acl) return ERR_PTR(-ENOMEM); ext_acl->a_version = cpu_to_le32(EXT2_ACL_VERSION); @@ -464,7 +464,7 @@ ext2_xattr_set_acl(struct inode *inode, int type, const void *value, if (!test_opt(inode->i_sb, POSIX_ACL)) return -EOPNOTSUPP; - if ((current->fsuid != inode->i_uid) && !capable(CAP_FOWNER)) + if (!is_owner_or_cap(inode)) return -EPERM; if (value) {