diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2020-12-07 11:44:12 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2020-12-07 11:50:45 -0500 |
commit | 641ac20403099dde8dcff2a83b9a42ccf1bdd20d (patch) | |
tree | 977132ccc87b993699b5bd229f09d92d6e499ba9 /fs/bcachefs/alloc_background.c | |
parent | 4de5f035a8eac1ce90e1e7a458a29663c34e9441 (diff) |
bcachefs: Fix rand_delete() testbcachefs-v5.9
When we didn't find a key to delete we were getting a null ptr deref.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/alloc_background.c')
-rw-r--r-- | fs/bcachefs/alloc_background.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/bcachefs/alloc_background.c b/fs/bcachefs/alloc_background.c index 2dd8a37f29e7..09a7f8c8583a 100644 --- a/fs/bcachefs/alloc_background.c +++ b/fs/bcachefs/alloc_background.c @@ -505,9 +505,6 @@ int bch2_bucket_io_time_reset(struct btree_trans *trans, unsigned dev, BTREE_ITER_CACHED| BTREE_ITER_CACHED_NOFILL| BTREE_ITER_INTENT); - if (IS_ERR(iter)) - return PTR_ERR(iter); - a = bch2_trans_kmalloc(trans, BKEY_ALLOC_U64s_MAX * 8); ret = PTR_ERR_OR_ZERO(a); if (ret) |