From: Kent Overstreet Date: Sun, 4 May 2025 22:46:16 +0000 (-0400) Subject: bcachefs: fix hung task timeout in journal read X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=aed4ccbf4595e08f3fa80c7faaf1d2188d61bc70;p=linux-2.6-microblaze.git bcachefs: fix hung task timeout in journal read Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/journal_io.c b/fs/bcachefs/journal_io.c index 63cdf885c9e2..ded18a94ed02 100644 --- a/fs/bcachefs/journal_io.c +++ b/fs/bcachefs/journal_io.c @@ -19,6 +19,7 @@ #include #include +#include void bch2_journal_pos_from_member_info_set(struct bch_fs *c) { @@ -1262,7 +1263,8 @@ int bch2_journal_read(struct bch_fs *c, degraded = true; } - closure_sync(&jlist.cl); + while (closure_sync_timeout(&jlist.cl, sysctl_hung_task_timeout_secs * HZ / 2)) + ; if (jlist.ret) return jlist.ret;