From: Kent Overstreet Date: Fri, 1 Oct 2021 14:08:13 +0000 (-0400) Subject: bcachefs: Fix allocator shutdown error message X-Git-Tag: v6.7-rc1~201^2~1371 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=69294246b7a441a112d1a550ffc8e4e1e45142a4;p=thirdparty%2Fkernel%2Flinux.git bcachefs: Fix allocator shutdown error message We return 1 to indicate kthread_should_stop() returned true - we shouldn't be printing an error. Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/alloc_background.c b/fs/bcachefs/alloc_background.c index 54fbfb22d671b..fc1b4b354b050 100644 --- a/fs/bcachefs/alloc_background.c +++ b/fs/bcachefs/alloc_background.c @@ -857,10 +857,10 @@ static int bch2_invalidate_buckets(struct bch_fs *c, struct bch_dev *ca) /* If we used NOWAIT, don't return the error: */ if (!fifo_empty(&ca->free_inc)) ret = 0; - if (ret) { + if (ret < 0) bch_err(ca, "error invalidating buckets: %i", ret); + if (ret) return ret; - } if (journal_seq) ret = bch2_journal_flush_seq(&c->journal, journal_seq);