diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2006-10-01 02:27:21 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-01 03:39:19 -0400 |
commit | 52978be636374c4bfb61220b37fa12f55a071c46 (patch) | |
tree | 36444be7bdbc0cdd99d903c0ad87316c93427517 /fs/posix_acl.c | |
parent | 1a2f67b459bb7846d4a15924face63eb2683acc2 (diff) |
[PATCH] kmemdup: some users
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/posix_acl.c')
-rw-r--r-- | fs/posix_acl.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/posix_acl.c b/fs/posix_acl.c index 6c8dcf7613fd..aec931e09973 100644 --- a/fs/posix_acl.c +++ b/fs/posix_acl.c | |||
@@ -58,11 +58,9 @@ posix_acl_clone(const struct posix_acl *acl, gfp_t flags) | |||
58 | if (acl) { | 58 | if (acl) { |
59 | int size = sizeof(struct posix_acl) + acl->a_count * | 59 | int size = sizeof(struct posix_acl) + acl->a_count * |
60 | sizeof(struct posix_acl_entry); | 60 | sizeof(struct posix_acl_entry); |
61 | clone = kmalloc(size, flags); | 61 | clone = kmemdup(acl, size, flags); |
62 | if (clone) { | 62 | if (clone) |
63 | memcpy(clone, acl, size); | ||
64 | atomic_set(&clone->a_refcount, 1); | 63 | atomic_set(&clone->a_refcount, 1); |
65 | } | ||
66 | } | 64 | } |
67 | return clone; | 65 | return clone; |
68 | } | 66 | } |