diff options
| author | Pavel Begunkov <[email protected]> | 2025-01-28 20:56:10 +0000 |
|---|---|---|
| committer | Jens Axboe <[email protected]> | 2025-01-28 22:10:40 +0000 |
| commit | 16ac51a0a7aa051fd3b82fa077597488b5572d41 (patch) | |
| tree | e3efd899d869560848d3a3c9db7fd88634f8d368 /io_uring/alloc_cache.h | |
| parent | io_uring: include all deps for alloc_cache.h (diff) | |
| download | kernel-16ac51a0a7aa051fd3b82fa077597488b5572d41.tar.gz kernel-16ac51a0a7aa051fd3b82fa077597488b5572d41.zip | |
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 <[email protected]>
Reviewed-by: Gabriel Krisman Bertazi <[email protected]>
Link: https://lore.kernel.org/r/35e53e83f6e16478dca0028a64a6cc905dc764d3.1738087204.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'io_uring/alloc_cache.h')
| -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) |
