diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2018-10-10 01:39:05 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2018-10-10 01:39:05 -0400 |
commit | 99732e88454a1b5e3522c23df894b1bfd2678a1c (patch) | |
tree | 0cc1584819acfdb2ec3d432ab91ea2ce8b3cf5ef | |
parent | f070421a0bf062c9fe2dd3430b1d8450124fdbdc (diff) |
fixup! bcachefs: Allocation code refactoring
-rw-r--r-- | fs/bcachefs/alloc_foreground.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/bcachefs/alloc_foreground.c b/fs/bcachefs/alloc_foreground.c index 0fe13bd48c6d..42a6e29a4caa 100644 --- a/fs/bcachefs/alloc_foreground.c +++ b/fs/bcachefs/alloc_foreground.c @@ -628,6 +628,13 @@ alloc_done: return wp; err: + open_bucket_for_each(c, &wp->ptrs, ob, i) + if (ptrs.nr < ARRAY_SIZE(ptrs.v)) + ob_push(c, &ptrs, ob); + else + open_bucket_free_unused(c, wp, ob); + wp->ptrs = ptrs; + mutex_unlock(&wp->lock); return ERR_PTR(ret); } |