diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-07-07 11:38:29 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:10:06 +0300 |
commit | c8b4534d820f47480e7d5efb38d13e10919ccc7c (patch) | |
tree | 41edf7df973f36eb80b420ef6e62c4857d8d07ed /fs/bcachefs/journal.c | |
parent | 8726dc936fb79fda4a0280033cdd180f7f343cdd (diff) | |
download | linux-c8b4534d820f47480e7d5efb38d13e10919ccc7c.tar.xz |
bcachefs: Delete redundant log messages
Now that we have distinct error codes for different memory allocation
failures, the early init log messages are no longer needed.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/journal.c')
-rw-r--r-- | fs/bcachefs/journal.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/fs/bcachefs/journal.c b/fs/bcachefs/journal.c index f33ab45b7944..9c4f61ab33e4 100644 --- a/fs/bcachefs/journal.c +++ b/fs/bcachefs/journal.c @@ -1220,12 +1220,8 @@ void bch2_fs_journal_exit(struct journal *j) int bch2_fs_journal_init(struct journal *j) { - struct bch_fs *c = container_of(j, struct bch_fs, journal); static struct lock_class_key res_key; unsigned i; - int ret = 0; - - pr_verbose_init(c->opts, ""); spin_lock_init(&j->lock); spin_lock_init(&j->err_lock); @@ -1242,24 +1238,18 @@ int bch2_fs_journal_init(struct journal *j) ((union journal_res_state) { .cur_entry_offset = JOURNAL_ENTRY_CLOSED_VAL }).v); - if (!(init_fifo(&j->pin, JOURNAL_PIN, GFP_KERNEL))) { - ret = -BCH_ERR_ENOMEM_journal_pin_fifo; - goto out; - } + if (!(init_fifo(&j->pin, JOURNAL_PIN, GFP_KERNEL))) + return -BCH_ERR_ENOMEM_journal_pin_fifo; for (i = 0; i < ARRAY_SIZE(j->buf); i++) { j->buf[i].buf_size = JOURNAL_ENTRY_SIZE_MIN; j->buf[i].data = kvpmalloc(j->buf[i].buf_size, GFP_KERNEL); - if (!j->buf[i].data) { - ret = -BCH_ERR_ENOMEM_journal_buf; - goto out; - } + if (!j->buf[i].data) + return -BCH_ERR_ENOMEM_journal_buf; } j->pin.front = j->pin.back = 1; -out: - pr_verbose_init(c->opts, "ret %i", ret); - return ret; + return 0; } /* debug: */ |