summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2021-05-28 01:25:02 -0400
committerKent Overstreet <kent.overstreet@gmail.com>2021-05-28 01:26:33 -0400
commit79b92aa525b47f5ec12dda5f3e94cb8533751a49 (patch)
tree28d647233218dfd285dd55bee56970dace732969
parent67965b90d964a25bb621e1769b2bff53c64cc227 (diff)
fixup! bcachefs: Fix journal write error path
-rw-r--r--fs/bcachefs/journal_io.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/bcachefs/journal_io.c b/fs/bcachefs/journal_io.c
index 691b559e682c..58298d3b3a58 100644
--- a/fs/bcachefs/journal_io.c
+++ b/fs/bcachefs/journal_io.c
@@ -1333,8 +1333,6 @@ static void do_journal_write(struct closure *cl)
struct bio *bio;
unsigned sectors = vstruct_sectors(w->data, c->block_bits);
- w->devs_written = bch2_bkey_devs(bkey_i_to_s_c(&w->key));
-
extent_for_each_ptr(bkey_i_to_s_extent(&w->key), ptr) {
ca = bch_dev_bkey_exists(c, ptr->dev);
if (!percpu_ref_tryget(&ca->io_ref)) {
@@ -1514,10 +1512,8 @@ retry_alloc:
return;
}
- /*
- * XXX: we really should just disable the entire journal in nochanges
- * mode
- */
+ w->devs_written = bch2_bkey_devs(bkey_i_to_s_c(&w->key));
+
if (c->opts.nochanges)
goto no_io;