diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-02-23 19:46:34 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:09:25 +0300 |
commit | 82697a10dd4b9a6f7c6f98a525778d032db2f2fb (patch) | |
tree | 3c170b18bbfc5cdcdcb5253ac390a0c0ee1eecca /fs/bcachefs/vstructs.h | |
parent | 78a8f36280e178df4e78382c82a20e3af1704e65 (diff) | |
download | linux-82697a10dd4b9a6f7c6f98a525778d032db2f2fb.tar.xz |
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 <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/vstructs.h')
-rw-r--r-- | fs/bcachefs/vstructs.h | 2 |
1 files changed, 1 insertions, 1 deletions
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) \ |