mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 07:33:19 +02:00
bcachefs: nocow locking: Fix lock leak
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
793a06d984
commit
efedfc2ece
|
|
@ -1376,10 +1376,12 @@ static void bch2_nocow_write(struct bch_write_op *op)
|
|||
/* Fall back to COW path: */
|
||||
goto out;
|
||||
err_bucket_stale:
|
||||
while (--i >= 0)
|
||||
while (i >= 0) {
|
||||
bch2_bucket_nocow_unlock(&c->nocow_locks,
|
||||
buckets[i].b,
|
||||
BUCKET_NOCOW_LOCK_UPDATE);
|
||||
--i;
|
||||
}
|
||||
for (i = 0; i < nr_buckets; i++)
|
||||
percpu_ref_put(&bch_dev_bkey_exists(c, buckets[i].b.inode)->io_ref);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user