bcachefs: Fix a shift greater than type size

Found by UBSAN

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2021-02-11 14:49:36 -05:00 committed by Kent Overstreet
parent 5ea037d03c
commit 9d40326176

View File

@ -479,7 +479,7 @@ int bch2_inode_create(struct btree_trans *trans,
u64 min, max, start, *hint;
int ret;
unsigned cpu = raw_smp_processor_id();
u64 cpu = raw_smp_processor_id();
unsigned bits = (c->opts.inodes_32bit
? 31 : 63) - c->inode_shard_bits;