summaryrefslogtreecommitdiff
path: root/fs/io_uring.c
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2021-06-15 15:20:13 +0300
committerJens Axboe <axboe@kernel.dk>2021-06-16 00:40:17 +0300
commit27f6b318dea2d7ccccc9dca416e59431838c2929 (patch)
tree3ffe0b553b7a5e3163dd755042dc2d7bae721c6d /fs/io_uring.c
parentdd9ae8a0b2985ead64dfcfa2f9a0ce5efa1480aa (diff)
downloadlinux-27f6b318dea2d7ccccc9dca416e59431838c2929.tar.xz
io_uring: fix min types mismatch in table alloc
fs/io_uring.c: In function 'io_alloc_page_table': include/linux/minmax.h:20:28: warning: comparison of distinct pointer types lacks a cast Cast everything to size_t using min_t. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Fixes: 9123c8ffce16 ("io_uring: add helpers for 2 level table alloc") Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/50f420a956bca070a43810d4a805293ed54f39d8.1623759527.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r--fs/io_uring.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 807a1abe69c5..6292b8da0a75 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -7088,7 +7088,7 @@ static void **io_alloc_page_table(size_t size)
return NULL;
for (i = 0; i < nr_tables; i++) {
- unsigned int this_size = min(size, PAGE_SIZE);
+ unsigned int this_size = min_t(size_t, size, PAGE_SIZE);
table[i] = kzalloc(this_size, GFP_KERNEL);
if (!table[i]) {