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:
parent
299276502d
commit
16ac51a0a7
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user