From: Jens Axboe Date: Sat, 22 Jul 2023 16:28:37 +0000 (-0600) Subject: iomap: use an unsigned type for IOMAP_DIO_* defines X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=44842f647346cac4063b2bb8e9476fad09e363e7;p=linux.git iomap: use an unsigned type for IOMAP_DIO_* defines IOMAP_DIO_DIRTY shifts by 31 bits, which makes UBSAN unhappy. Clean up all the defines by making the shifted value an unsigned value. Reviewed-by: Darrick J. Wong Reported-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Dave Chinner Signed-off-by: Jens Axboe --- diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c index 0ce60e80c901e..7d627d43d10bb 100644 --- a/fs/iomap/direct-io.c +++ b/fs/iomap/direct-io.c @@ -20,10 +20,10 @@ * Private flags for iomap_dio, must not overlap with the public ones in * iomap.h: */ -#define IOMAP_DIO_WRITE_FUA (1 << 28) -#define IOMAP_DIO_NEED_SYNC (1 << 29) -#define IOMAP_DIO_WRITE (1 << 30) -#define IOMAP_DIO_DIRTY (1 << 31) +#define IOMAP_DIO_WRITE_FUA (1U << 28) +#define IOMAP_DIO_NEED_SYNC (1U << 29) +#define IOMAP_DIO_WRITE (1U << 30) +#define IOMAP_DIO_DIRTY (1U << 31) struct iomap_dio { struct kiocb *iocb;