bcachefs: Fix an overflow check
authorKent Overstreet <kent.overstreet@linux.dev>
Wed, 20 Sep 2023 02:18:39 +0000 (22:18 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:10:14 +0000 (17:10 -0400)
commita55fc65eb2c71da5d422937db767a78c6438f9b6
treebcd324fe6e308cf3de514dce898ded93b63ec6c2
parentf7f6943a8c6dccbd085600bbb7bae4f6f6047dc4
bcachefs: Fix an overflow check

When bucket sector counts were changed from u16s to u32s, a few things
were missed. This fixes an overflow check, and a truncation that
prevented the overflow check from firing.

Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/buckets.c