summaryrefslogtreecommitdiff
path: root/fs/bcachefs/io.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2022-11-02 22:41:32 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:09:45 +0300
commit07de1803b888131ef1675b17a0260b50d684175e (patch)
tree20f4af85a248dabd9a7939c64b6d09c77e0d7ca7 /fs/bcachefs/io.c
parent984dc67e3bceb8871444961df0d2c2a45d5a3f4e (diff)
downloadlinux-07de1803b888131ef1675b17a0260b50d684175e.tar.xz
bcachefs: Kill bch2_alloc_sectors_start()
Only used in one place, just inline it there. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/io.c')
-rw-r--r--fs/bcachefs/io.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/fs/bcachefs/io.c b/fs/bcachefs/io.c
index 4818c78e5213..e754f57c1342 100644
--- a/fs/bcachefs/io.c
+++ b/fs/bcachefs/io.c
@@ -1274,19 +1274,19 @@ again:
* freeing up space on specific disks, which means that
* allocations for specific disks may hang arbitrarily long:
*/
- ret = bch2_alloc_sectors_start(c,
- op->target,
- op->opts.erasure_code && !(op->flags & BCH_WRITE_CACHED),
- op->write_point,
- &op->devs_have,
- op->nr_replicas,
- op->nr_replicas_required,
- op->alloc_reserve,
- op->flags,
- (op->flags & (BCH_WRITE_ALLOC_NOWAIT|
- BCH_WRITE_ONLY_SPECIFIED_DEVS))
- ? NULL : &op->cl,
- &wp);
+ ret = bch2_trans_do(c, NULL, NULL, 0,
+ bch2_alloc_sectors_start_trans(&trans,
+ op->target,
+ op->opts.erasure_code && !(op->flags & BCH_WRITE_CACHED),
+ op->write_point,
+ &op->devs_have,
+ op->nr_replicas,
+ op->nr_replicas_required,
+ op->alloc_reserve,
+ op->flags,
+ (op->flags & (BCH_WRITE_ALLOC_NOWAIT|
+ BCH_WRITE_ONLY_SPECIFIED_DEVS))
+ ? NULL : &op->cl, &wp));
if (unlikely(ret)) {
if (ret == -EAGAIN)
break;