bcachefs: Fix integer overflow warnings on 32 bit
authorKent Overstreet <kent.overstreet@linux.dev>
Fri, 17 Feb 2023 21:06:51 +0000 (16:06 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:53 +0000 (17:09 -0400)
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/util.c

index 12f4107..e0c93da 100644 (file)
@@ -428,8 +428,8 @@ static const struct time_unit {
        { "us",         NSEC_PER_USEC    },
        { "ms",         NSEC_PER_MSEC    },
        { "s",          NSEC_PER_SEC     },
-       { "m",          NSEC_PER_SEC * 60},
-       { "h",          NSEC_PER_SEC * 3600},
+       { "m",          (u64) NSEC_PER_SEC * 60},
+       { "h",          (u64) NSEC_PER_SEC * 3600},
        { "eon",        U64_MAX          },
 };