diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-05-06 10:14:13 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-05-06 10:14:13 -0400 |
commit | 72e71bf0298c7ed985bcd0d3c7ff4ca19de60373 (patch) | |
tree | cb44a79a26083529d6c4fc91e947f726457a0696 /fs/bcachefs/journal.c | |
parent | c258c08add1cc8fa7719f112c5db36c08c507f1e (diff) |
bcachefs: Fix a scheduler splat in __bch2_next_write_buffer_flush_journal_buf()
We're using mutex_lock() inside a wait_event() conditional -
prepare_to_wait() has already flipped task state, so potentially
blocking ops need annotation.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/journal.c')
-rw-r--r-- | fs/bcachefs/journal.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/bcachefs/journal.c b/fs/bcachefs/journal.c index 9c9a25dbd613..9c2af544251a 100644 --- a/fs/bcachefs/journal.c +++ b/fs/bcachefs/journal.c @@ -870,6 +870,8 @@ static struct journal_buf *__bch2_next_write_buffer_flush_journal_buf(struct jou { struct journal_buf *ret = NULL; + /* We're inside wait_event(), but using mutex_lock(: */ + sched_annotate_sleep(); mutex_lock(&j->buf_lock); spin_lock(&j->lock); max_seq = min(max_seq, journal_cur_seq(j)); |