From 82697a10dd4b9a6f7c6f98a525778d032db2f2fb Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Wed, 23 Feb 2022 11:46:34 -0500 Subject: bcachefs: Fix 32 bit build vstruct_bytes() was returning a u64 - it should be a size_t, the corect type for the size of anything that fits in memory. Also replace a 64 bit divide with div_u64(). Signed-off-by: Kent Overstreet --- fs/bcachefs/vstructs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/bcachefs/vstructs.h') diff --git a/fs/bcachefs/vstructs.h b/fs/bcachefs/vstructs.h index c099cdc0605f..53a694d71967 100644 --- a/fs/bcachefs/vstructs.h +++ b/fs/bcachefs/vstructs.h @@ -20,7 +20,7 @@ ({ \ BUILD_BUG_ON(offsetof(_type, _data) % sizeof(u64)); \ \ - (offsetof(_type, _data) + (_u64s) * sizeof(u64)); \ + (size_t) (offsetof(_type, _data) + (_u64s) * sizeof(u64)); \ }) #define vstruct_bytes(_s) \ -- cgit v1.2.3