https://github.com/torvalds/linux
Revision ebf936670721be805a9cb87781a5ee9271ba4633 authored by Pavel Begunkov on 01 March 2021, 18:20:47 UTC, committed by Jens Axboe on 04 March 2021, 13:38:05 UTC
__io_queue_async_work() is only called from io_queue_async_work(),
inline it.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent f85c310
Raw File
Tip revision: ebf936670721be805a9cb87781a5ee9271ba4633 authored by Pavel Begunkov on 01 March 2021, 18:20:47 UTC
io_uring: inline __io_queue_async_work()
Tip revision: ebf9366
fault-inject-usercopy.c
// SPDX-License-Identifier: GPL-2.0-only
#include <linux/fault-inject.h>
#include <linux/fault-inject-usercopy.h>

static struct {
	struct fault_attr attr;
} fail_usercopy = {
	.attr = FAULT_ATTR_INITIALIZER,
};

static int __init setup_fail_usercopy(char *str)
{
	return setup_fault_attr(&fail_usercopy.attr, str);
}
__setup("fail_usercopy=", setup_fail_usercopy);

#ifdef CONFIG_FAULT_INJECTION_DEBUG_FS

static int __init fail_usercopy_debugfs(void)
{
	struct dentry *dir;

	dir = fault_create_debugfs_attr("fail_usercopy", NULL,
					&fail_usercopy.attr);
	if (IS_ERR(dir))
		return PTR_ERR(dir);

	return 0;
}

late_initcall(fail_usercopy_debugfs);

#endif /* CONFIG_FAULT_INJECTION_DEBUG_FS */

bool should_fail_usercopy(void)
{
	return should_fail(&fail_usercopy.attr, 1);
}
EXPORT_SYMBOL_GPL(should_fail_usercopy);
back to top