summaryrefslogtreecommitdiff
path: root/libbcachefs/async_objs.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2025-07-12 11:18:33 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2025-07-12 19:49:41 -0400
commitdae984cf382a5fe3572dc875b9fe86a9163ff035 (patch)
tree4bd52214a4046322eefaf92805b54ae1aa6a7615 /libbcachefs/async_objs.h
parent4e973f190c90351fa0e56d0523877d8fe6a646bd (diff)
Update bcachefs sources to 8efd93eb2d0f bcachefs: Fix replicas max options
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'libbcachefs/async_objs.h')
-rw-r--r--libbcachefs/async_objs.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/libbcachefs/async_objs.h b/libbcachefs/async_objs.h
index cd6489b8..451db4c5 100644
--- a/libbcachefs/async_objs.h
+++ b/libbcachefs/async_objs.h
@@ -3,9 +3,10 @@
#define _BCACHEFS_ASYNC_OBJS_H
#ifdef CONFIG_BCACHEFS_ASYNC_OBJECT_LISTS
-static inline void __async_object_list_del(struct fast_list *head, unsigned idx)
+static inline void __async_object_list_del(struct fast_list *head, unsigned *idx)
{
- fast_list_remove(head, idx);
+ fast_list_remove(head, *idx);
+ *idx = 0;
}
static inline int __async_object_list_add(struct fast_list *head, void *obj, unsigned *idx)
@@ -16,7 +17,7 @@ static inline int __async_object_list_add(struct fast_list *head, void *obj, uns
}
#define async_object_list_del(_c, _list, idx) \
- __async_object_list_del(&(_c)->async_objs[BCH_ASYNC_OBJ_LIST_##_list].list, idx)
+ __async_object_list_del(&(_c)->async_objs[BCH_ASYNC_OBJ_LIST_##_list].list, &idx)
#define async_object_list_add(_c, _list, obj, idx) \
__async_object_list_add(&(_c)->async_objs[BCH_ASYNC_OBJ_LIST_##_list].list, obj, idx)