]> git.dujemihanovic.xyz Git - linux.git/commitdiff
bcachefs: Add missing sched_annotate_sleep() in bch2_journal_flush_seq_async()
authorKent Overstreet <kent.overstreet@linux.dev>
Tue, 7 May 2024 03:11:43 +0000 (23:11 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Tue, 7 May 2024 15:02:37 +0000 (11:02 -0400)
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/journal.c

index 9c2af544251af47ec4834486cd42ba32be26ee9c..a8b08e76d0d01e036cb34eef68c133e9930b1f97 100644 (file)
@@ -706,6 +706,12 @@ recheck_need_open:
 
                spin_unlock(&j->lock);
 
+               /*
+                * We're called from bch2_journal_flush_seq() -> wait_event();
+                * but this might block. We won't usually block, so we won't
+                * livelock:
+                */
+               sched_annotate_sleep();
                ret = bch2_journal_res_get(j, &res, jset_u64s(0), 0);
                if (ret)
                        return ret;