diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-11-03 02:06:52 +0100 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-01-01 17:47:41 +0100 |
commit | b05c0e9370bec71c62df690250f451e58e8ed2a4 (patch) | |
tree | e6362bd4fdb2397dbf028de19272b7d7edb0f6a3 /fs/bcachefs/journal_io.c | |
parent | bcachefs: Unwritten journal buffers are always dirty (diff) | |
download | linux-b05c0e9370bec71c62df690250f451e58e8ed2a4.tar.xz linux-b05c0e9370bec71c62df690250f451e58e8ed2a4.zip |
bcachefs: journal->buf_lock
Add a new lock for synchronizing between journal IO path and btree write
buffer flush.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/journal_io.c')
-rw-r--r-- | fs/bcachefs/journal_io.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/bcachefs/journal_io.c b/fs/bcachefs/journal_io.c index f2e038116b0f..afcb2a435956 100644 --- a/fs/bcachefs/journal_io.c +++ b/fs/bcachefs/journal_io.c @@ -1885,9 +1885,11 @@ CLOSURE_CALLBACK(bch2_journal_write) if (ret) goto err; + mutex_lock(&j->buf_lock); journal_buf_realloc(j, w); ret = bch2_journal_write_prep(j, w); + mutex_unlock(&j->buf_lock); if (ret) goto err; |