mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-04 16:25:34 +00:00
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>
This commit is contained in:
parent
c258c08add
commit
72e71bf029
1 changed files with 2 additions and 0 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Reference in a new issue