ALSA: usb-audio: add support for Akai MPD16
[safe/jmp/linux-2.6] / fs / posix_acl.c
index 6c8dcf7..39df95a 100644 (file)
@@ -58,11 +58,9 @@ posix_acl_clone(const struct posix_acl *acl, gfp_t flags)
        if (acl) {
                int size = sizeof(struct posix_acl) + acl->a_count *
                           sizeof(struct posix_acl_entry);
-               clone = kmalloc(size, flags);
-               if (clone) {
-                       memcpy(clone, acl, size);
+               clone = kmemdup(acl, size, flags);
+               if (clone)
                        atomic_set(&clone->a_refcount, 1);
-               }
        }
        return clone;
 }
@@ -219,11 +217,11 @@ posix_acl_permission(struct inode *inode, const struct posix_acl *acl, int want)
                 switch(pa->e_tag) {
                         case ACL_USER_OBJ:
                                /* (May have been checked already) */
-                                if (inode->i_uid == current->fsuid)
+                               if (inode->i_uid == current_fsuid())
                                         goto check_perm;
                                 break;
                         case ACL_USER:
-                                if (pa->e_id == current->fsuid)
+                               if (pa->e_id == current_fsuid())
                                         goto mask;
                                break;
                         case ACL_GROUP_OBJ: