Skip to content

Commit 44842f6

Browse files
committed
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 <[email protected]> Reported-by: Darrick J. Wong <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Dave Chinner <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 3486237 commit 44842f6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

fs/iomap/direct-io.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
* Private flags for iomap_dio, must not overlap with the public ones in
2121
* iomap.h:
2222
*/
23-
#define IOMAP_DIO_WRITE_FUA (1 << 28)
24-
#define IOMAP_DIO_NEED_SYNC (1 << 29)
25-
#define IOMAP_DIO_WRITE (1 << 30)
26-
#define IOMAP_DIO_DIRTY (1 << 31)
23+
#define IOMAP_DIO_WRITE_FUA (1U << 28)
24+
#define IOMAP_DIO_NEED_SYNC (1U << 29)
25+
#define IOMAP_DIO_WRITE (1U << 30)
26+
#define IOMAP_DIO_DIRTY (1U << 31)
2727

2828
struct iomap_dio {
2929
struct kiocb *iocb;

0 commit comments

Comments
 (0)