2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00

io_uring: dont ifdef io_alloc_cache_kasan()

Use IS_ENABLED in io_alloc_cache_kasan() so at least it gets compile
tested without KASAN.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Reviewed-by: Gabriel Krisman Bertazi <krisman@suse.de>
Link: https://lore.kernel.org/r/35e53e83f6e16478dca0028a64a6cc905dc764d3.1738087204.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Pavel Begunkov 2025-01-28 20:56:10 +00:00 committed by Jens Axboe
parent 299276502d
commit 16ac51a0a7

View File

@ -8,18 +8,14 @@
*/ */
#define IO_ALLOC_CACHE_MAX 128 #define IO_ALLOC_CACHE_MAX 128
#if defined(CONFIG_KASAN)
static inline void io_alloc_cache_kasan(struct iovec **iov, int *nr) static inline void io_alloc_cache_kasan(struct iovec **iov, int *nr)
{ {
if (IS_ENABLED(CONFIG_KASAN)) {
kfree(*iov); kfree(*iov);
*iov = NULL; *iov = NULL;
*nr = 0; *nr = 0;
}
} }
#else
static inline void io_alloc_cache_kasan(struct iovec **iov, int *nr)
{
}
#endif
static inline bool io_alloc_cache_put(struct io_alloc_cache *cache, static inline bool io_alloc_cache_put(struct io_alloc_cache *cache,
void *entry) void *entry)