aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/posix_acl.c6
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}