mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-26 04:16:39 +00: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
1 changed files with 3 additions and 1 deletions
|
@ -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 a new issue