summaryrefslogtreecommitdiff
path: root/fs/bcachefs/recovery.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2019-06-18 19:37:39 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:23 -0400
commitf707e3d8f41e77aff94941168ab30da2314a5984 (patch)
treec34cc58dd75ff398b5bc9968007340ae2215ab8b /fs/bcachefs/recovery.c
parent09bf409b4689d0297da2cc5c95106ef89fa7cfb7 (diff)
downloadlwn-f707e3d8f41e77aff94941168ab30da2314a5984.tar.gz
lwn-f707e3d8f41e77aff94941168ab30da2314a5984.zip
bcachefs: fix kasan splat
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/recovery.c')
-rw-r--r--fs/bcachefs/recovery.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c
index dc9222b1a196..2b7133e376e3 100644
--- a/fs/bcachefs/recovery.c
+++ b/fs/bcachefs/recovery.c
@@ -721,10 +721,12 @@ int bch2_fs_recovery(struct bch_fs *c)
ret = bch2_blacklist_table_initialize(c);
- ret = verify_journal_entries_not_blacklisted_or_missing(c,
- &journal_entries);
- if (ret)
- goto err;
+ if (!list_empty(&journal_entries)) {
+ ret = verify_journal_entries_not_blacklisted_or_missing(c,
+ &journal_entries);
+ if (ret)
+ goto err;
+ }
ret = bch2_fs_journal_start(&c->journal, journal_seq,
&journal_entries);