diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-04-02 01:03:58 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-04-02 01:04:10 -0400 |
commit | c42cd606e4f004e9ba36a05b9adb9e4eead5834a (patch) | |
tree | 5844d6dd14aa5a9f68ec32b0f4e1e526e2a79de9 /fs | |
parent | e2a316b3cc45a1198f3feb18707403bb7f0cbc15 (diff) |
bcachefs: fix nocow lock deadlock
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/bcachefs/data_update.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/bcachefs/data_update.c b/fs/bcachefs/data_update.c index b564404dad71..34731ee0217f 100644 --- a/fs/bcachefs/data_update.c +++ b/fs/bcachefs/data_update.c @@ -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, |