diff options
author | Brett Holman <bholman.devel@gmail.com> | 2023-02-10 16:36:55 -0700 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:50 -0400 |
commit | d7afe651ffa29fca79725a3cf5580a3fd2421fed (patch) | |
tree | 76ba665438af9fd6111eb1a6ca0dc237bf47505e /fs/bcachefs/replicas.c | |
parent | c72f687a1ff1801b404fab804fdddcaf034e6ef4 (diff) | |
download | linux-d7afe651ffa29fca79725a3cf5580a3fd2421fed.tar.gz linux-d7afe651ffa29fca79725a3cf5580a3fd2421fed.tar.bz2 linux-d7afe651ffa29fca79725a3cf5580a3fd2421fed.zip |
bcachefs: Fix memleak in replicas_table_update()
Signed-off-by: Brett Holman <bholman.devel@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/replicas.c')
-rw-r--r-- | fs/bcachefs/replicas.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/fs/bcachefs/replicas.c b/fs/bcachefs/replicas.c index 482bedf4be8b..3bff21959d98 100644 --- a/fs/bcachefs/replicas.c +++ b/fs/bcachefs/replicas.c @@ -304,13 +304,6 @@ static int replicas_table_update(struct bch_fs *c, sizeof(u64), GFP_KERNEL))) goto err; - memset(new_usage, 0, sizeof(new_usage)); - - for (i = 0; i < ARRAY_SIZE(new_usage); i++) - if (!(new_usage[i] = __alloc_percpu_gfp(bytes, - sizeof(u64), GFP_KERNEL))) - goto err; - if (!(new_base = kzalloc(bytes, GFP_KERNEL)) || !(new_scratch = kmalloc(scratch_bytes, GFP_KERNEL)) || (c->usage_gc && |