mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-07 21:53:44 +00:00
bcachefs: Fix bch2_prt_bitflags()
This fixes an infinite loop when there's a set bit at position >= 32. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
9db2f86060
commit
48f866e90f
@ -415,11 +415,11 @@ void bch2_prt_bitflags(struct printbuf *out,
|
||||
while (list[nr])
|
||||
nr++;
|
||||
|
||||
while (flags && (bit = __ffs(flags)) < nr) {
|
||||
while (flags && (bit = __ffs64(flags)) < nr) {
|
||||
if (!first)
|
||||
bch2_prt_printf(out, ",");
|
||||
first = false;
|
||||
bch2_prt_printf(out, "%s", list[bit]);
|
||||
flags ^= 1 << bit;
|
||||
flags ^= BIT_ULL(bit);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user