Re: [-next RESEND] fault-injection: using debugfs_create_xul() instead of debugfs_create_xl()

From: Akinobu Mita
Date: Thu Oct 06 2022 - 10:41:32 EST


Andrew, could you consider picking up this patch?

2022年9月28日(水) 10:54 Wang Yufen <wangyufen@xxxxxxxxxx>:
>
> Using debugfs_create_xul() instead of debugfs_create_xl(), and del the
> local define debugfs_create_xl().
>
> Suggested-by: Akinobu Mita <akinobu.mita@xxxxxxxxx>
> Signed-off-by: Wang Yufen <wangyufen@xxxxxxxxxx>
> Signed-off-by: Wei Yongjun <weiyongjun1@xxxxxxxxxx>

Reviewed-by: Akinobu Mita <akinobu.mita@xxxxxxxxx>

> ---
> lib/fault-inject.c | 16 ++++------------
> 1 file changed, 4 insertions(+), 12 deletions(-)
>
> diff --git a/lib/fault-inject.c b/lib/fault-inject.c
> index 9dd1dd1..dbb5409 100644
> --- a/lib/fault-inject.c
> +++ b/lib/fault-inject.c
> @@ -185,14 +185,6 @@ static void debugfs_create_ul(const char *name, umode_t mode,
>
> #ifdef CONFIG_FAULT_INJECTION_STACKTRACE_FILTER
>
> -DEFINE_SIMPLE_ATTRIBUTE(fops_xl, debugfs_ul_get, debugfs_ul_set, "0x%llx\n");
> -
> -static void debugfs_create_xl(const char *name, umode_t mode,
> - struct dentry *parent, unsigned long *value)
> -{
> - debugfs_create_file(name, mode, parent, value, &fops_xl);
> -}
> -
> static int debugfs_stacktrace_depth_set(void *data, u64 val)
> {
> *(unsigned long *)data =
> @@ -237,10 +229,10 @@ struct dentry *fault_create_debugfs_attr(const char *name,
> #ifdef CONFIG_FAULT_INJECTION_STACKTRACE_FILTER
> debugfs_create_stacktrace_depth("stacktrace-depth", mode, dir,
> &attr->stacktrace_depth);
> - debugfs_create_xl("require-start", mode, dir, &attr->require_start);
> - debugfs_create_xl("require-end", mode, dir, &attr->require_end);
> - debugfs_create_xl("reject-start", mode, dir, &attr->reject_start);
> - debugfs_create_xl("reject-end", mode, dir, &attr->reject_end);
> + debugfs_create_xul("require-start", mode, dir, &attr->require_start);
> + debugfs_create_xul("require-end", mode, dir, &attr->require_end);
> + debugfs_create_xul("reject-start", mode, dir, &attr->reject_start);
> + debugfs_create_xul("reject-end", mode, dir, &attr->reject_end);
> #endif /* CONFIG_FAULT_INJECTION_STACKTRACE_FILTER */
>
> attr->dname = dget(dir);
> --
> 1.8.3.1
>