mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
[PATCH] kmemdup: some users
Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
1a2f67b459
commit
52978be636
7 changed files with 13 additions and 22 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue