Commit 16ac51a0 authored by Pavel Begunkov's avatar Pavel Begunkov Committed by Jens Axboe
Browse files

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: default avatarPavel Begunkov <asml.silence@gmail.com>
Reviewed-by: default avatarGabriel Krisman Bertazi <krisman@suse.de>
Link: https://lore.kernel.org/r/35e53e83f6e16478dca0028a64a6cc905dc764d3.1738087204.git.asml.silence@gmail.com


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 29927650
Loading
Loading
Loading
Loading
+5 −9
Original line number Diff line number Diff line
@@ -8,18 +8,14 @@
 */
#define IO_ALLOC_CACHE_MAX	128

#if defined(CONFIG_KASAN)
static inline void io_alloc_cache_kasan(struct iovec **iov, int *nr)
{
	if (IS_ENABLED(CONFIG_KASAN)) {
		kfree(*iov);
		*iov = NULL;
		*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,
				      void *entry)