diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2025-01-28 23:56:10 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2025-01-29 01:10:40 +0300 |
commit | 16ac51a0a7aa051fd3b82fa077597488b5572d41 (patch) | |
tree | e3efd899d869560848d3a3c9db7fd88634f8d368 | |
parent | 299276502d41cd86376f47b7e087d017eaa0f914 (diff) | |
download | linux-16ac51a0a7aa051fd3b82fa077597488b5572d41.tar.xz |
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>
-rw-r--r-- | io_uring/alloc_cache.h | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/io_uring/alloc_cache.h b/io_uring/alloc_cache.h index 28436f413bd2..9eb374ad7490 100644 --- a/io_uring/alloc_cache.h +++ b/io_uring/alloc_cache.h @@ -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) -{ - kfree(*iov); - *iov = NULL; - *nr = 0; -} -#else static inline void io_alloc_cache_kasan(struct iovec **iov, int *nr) { + if (IS_ENABLED(CONFIG_KASAN)) { + kfree(*iov); + *iov = NULL; + *nr = 0; + } } -#endif static inline bool io_alloc_cache_put(struct io_alloc_cache *cache, void *entry) |