summaryrefslogtreecommitdiffstats
path: root/fs/afs/xattr.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--fs/afs/xattr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/afs/xattr.c b/fs/afs/xattr.c
index 64b2c0224f..e19f396aa3 100644
--- a/fs/afs/xattr.c
+++ b/fs/afs/xattr.c
@@ -75,7 +75,7 @@ static bool afs_make_acl(struct afs_operation *op,
{
struct afs_acl *acl;
- acl = kmalloc(sizeof(*acl) + size, GFP_KERNEL);
+ acl = kmalloc(struct_size(acl, data, size), GFP_KERNEL);
if (!acl) {
afs_op_nomem(op);
return false;