diff options
| author | Andreas Gruenbacher <agruenba@redhat.com> | 2022-08-05 18:37:03 +0200 |
|---|---|---|
| committer | Andreas Gruenbacher <agruenba@redhat.com> | 2022-08-05 18:37:03 +0200 |
| commit | 446279168e030fd0ed68e2bba336bef8bb3da352 (patch) | |
| tree | 0944d4dc64b07f74a6cf73d2ce803a789f8d786d /fs/ext4/xattr.c | |
| parent | 44dab005fd4298c209ea32ffda6131cad4358d21 (diff) | |
| parent | 6feaec81477af0390a41470cbd6b353f68dd853c (diff) | |
| download | linux-446279168e030fd0ed68e2bba336bef8bb3da352.tar.gz linux-446279168e030fd0ed68e2bba336bef8bb3da352.tar.bz2 linux-446279168e030fd0ed68e2bba336bef8bb3da352.zip | |
Merge part of branch 'for-next.instantiate' into for-next
Diffstat (limited to 'fs/ext4/xattr.c')
| -rw-r--r-- | fs/ext4/xattr.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c index 042325349098..564e28a1aa94 100644 --- a/fs/ext4/xattr.c +++ b/fs/ext4/xattr.c @@ -1895,11 +1895,10 @@ ext4_xattr_block_set(handle_t *handle, struct inode *inode, unlock_buffer(bs->bh); ea_bdebug(bs->bh, "cloning"); - s->base = kmalloc(bs->bh->b_size, GFP_NOFS); + s->base = kmemdup(BHDR(bs->bh), bs->bh->b_size, GFP_NOFS); error = -ENOMEM; if (s->base == NULL) goto cleanup; - memcpy(s->base, BHDR(bs->bh), bs->bh->b_size); s->first = ENTRY(header(s->base)+1); header(s->base)->h_refcount = cpu_to_le32(1); s->here = ENTRY(s->base + offset); |
