]> Git Repo - linux.git/commitdiff
bcachefs: fix nocow lock deadlock
authorKent Overstreet <[email protected]>
Tue, 2 Apr 2024 05:03:58 +0000 (01:03 -0400)
committerKent Overstreet <[email protected]>
Tue, 2 Apr 2024 05:04:10 +0000 (01:04 -0400)
Signed-off-by: Kent Overstreet <[email protected]>
fs/bcachefs/data_update.c

index b564404dad711bdb46bde1157494e98df3b0beaa..34731ee0217f62f6e43fb691e76083c46026b127 100644 (file)
@@ -580,8 +580,7 @@ int bch2_data_update_init(struct btree_trans *trans,
                                move_ctxt_wait_event(ctxt,
                                                (locked = bch2_bucket_nocow_trylock(&c->nocow_locks,
                                                                          PTR_BUCKET_POS(c, &p.ptr), 0)) ||
-                                               (!atomic_read(&ctxt->read_sectors) &&
-                                                !atomic_read(&ctxt->write_sectors)));
+                                               list_empty(&ctxt->ios));
 
                                if (!locked)
                                        bch2_bucket_nocow_lock(&c->nocow_locks,
This page took 0.052801 seconds and 4 git commands to generate.