diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-07-18 19:42:58 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:36 -0400 |
commit | d4bf5eecd78a90d019b933929a14c91d6d41af62 (patch) | |
tree | 97fb2cc218d2831c2e6f2993605239969c883638 /fs/bcachefs/journal_reclaim.c | |
parent | 615f867c14b2d70efb02dafb8e668d984e74d0e3 (diff) | |
download | linux-stable-d4bf5eecd78a90d019b933929a14c91d6d41af62.tar.gz linux-stable-d4bf5eecd78a90d019b933929a14c91d6d41af62.tar.bz2 linux-stable-d4bf5eecd78a90d019b933929a14c91d6d41af62.zip |
bcachefs: Use bch2_err_str() in error messages
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/journal_reclaim.c')
-rw-r--r-- | fs/bcachefs/journal_reclaim.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/bcachefs/journal_reclaim.c b/fs/bcachefs/journal_reclaim.c index 873cc14e2ae9..00d9e3a8e526 100644 --- a/fs/bcachefs/journal_reclaim.c +++ b/fs/bcachefs/journal_reclaim.c @@ -2,6 +2,7 @@ #include "bcachefs.h" #include "btree_key_cache.h" +#include "errcode.h" #include "error.h" #include "journal.h" #include "journal_io.h" @@ -741,15 +742,17 @@ int bch2_journal_reclaim_start(struct journal *j) { struct bch_fs *c = container_of(j, struct bch_fs, journal); struct task_struct *p; + int ret; if (j->reclaim_thread) return 0; p = kthread_create(bch2_journal_reclaim_thread, j, "bch-reclaim/%s", c->name); - if (IS_ERR(p)) { - bch_err(c, "error creating journal reclaim thread: %li", PTR_ERR(p)); - return PTR_ERR(p); + ret = PTR_ERR_OR_ZERO(p); + if (ret) { + bch_err(c, "error creating journal reclaim thread: %s", bch2_err_str(ret)); + return ret; } get_task_struct(p); |