[PATCH] kmemdup: some users

Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Alexey Dobriyan 2006-09-30 23:27:21 -07:00 • committed by Linus Torvalds
commit 52978be636
7 changed files with 13 additions and 22 deletions

View 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;
}