From: Kent Overstreet Date: Thu, 11 Feb 2021 19:49:36 +0000 (-0500) Subject: bcachefs: Fix a shift greater than type size X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=9d4032617605144717892f0763b617568bd15ac3;p=linux.git bcachefs: Fix a shift greater than type size Found by UBSAN Signed-off-by: Kent Overstreet Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/inode.c b/fs/bcachefs/inode.c index b11aecf2cfabf..3462e248c9540 100644 --- a/fs/bcachefs/inode.c +++ b/fs/bcachefs/inode.c @@ -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;