From: Alan Huang Date: Sat, 10 Aug 2024 16:11:46 +0000 (+0800) Subject: bcachefs: Convert open-coded extra computation to helper X-Git-Tag: v6.12~281^2~89 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=288a6690eb51c507a28cb599944096e4d3c42e94;p=platform%2Fkernel%2Flinux-amlogic.git bcachefs: Convert open-coded extra computation to helper This patch replaces open-coded extra computation to eytzinger1_extra. Signed-off-by: Alan Huang Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/bset.c b/fs/bcachefs/bset.c index 59158eb6d41f..00a821f617a5 100644 --- a/fs/bcachefs/bset.c +++ b/fs/bcachefs/bset.c @@ -732,7 +732,7 @@ retry: return; } - t->extra = (t->size - rounddown_pow_of_two(t->size - 1)) << 1; + t->extra = eytzinger1_extra(t->size - 1); /* First we figure out where the first key in each cacheline is */ eytzinger1_for_each(j, t->size - 1) {