aboutsummaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/darray.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-12-03 22:03:18 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2024-12-21 01:36:21 -0500
commit8dabb19ff4b802131ebfc1024de132b601c3c23d (patch)
tree9d1a67842b3da01c9ab5682689b225a92a2dc5e0 /fs/bcachefs/darray.h
parentbcachefs: logged ops only use inum 0 of logged ops btree (diff)
downloadlinux-8dabb19ff4b802131ebfc1024de132b601c3c23d.tar.gz
linux-8dabb19ff4b802131ebfc1024de132b601c3c23d.zip
bcachefs: Simplify disk accounting validate late
The validate late path was iterating over accounting entries in eytzinger order, which is unnecessarily tricky when we may have to remove entries. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/darray.h')
-rw-r--r--fs/bcachefs/darray.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/darray.h b/fs/bcachefs/darray.h
index 8f4c3f0665c4..c6151495985f 100644
--- a/fs/bcachefs/darray.h
+++ b/fs/bcachefs/darray.h
@@ -83,7 +83,7 @@ int __bch2_darray_resize_noprof(darray_char *, size_t, size_t, gfp_t);
for (typeof(&(_d).data[0]) _i = (_d).data; _i < (_d).data + (_d).nr; _i++)
#define darray_for_each_reverse(_d, _i) \
- for (typeof(&(_d).data[0]) _i = (_d).data + (_d).nr - 1; _i >= (_d).data; --_i)
+ for (typeof(&(_d).data[0]) _i = (_d).data + (_d).nr - 1; _i >= (_d).data && (_d).nr; --_i)
#define darray_init(_d) \
do { \