Whamcloud - gitweb
LU-9859 lnet: fold lprocfs_call_handler functionality into lnet_debugfs_* 09/44309/4
authorMr. NeilBrown <neilb@suse.de>
Wed, 4 Aug 2021 17:27:29 +0000 (13:27 -0400)
committerOleg Drokin <green@whamcloud.com>
Wed, 18 Aug 2021 01:59:31 +0000 (01:59 +0000)
commitaa5d081237947263597c0a9d39463d101508adc9
tree6676180fb6d5637135b19fc1c95808dff0ff89bb
parente423a0bd7a4a59be80e2011e62818b2f839fb246
LU-9859 lnet: fold lprocfs_call_handler functionality into lnet_debugfs_*

The calling convention for ->proc_handler is rather clumsy,
as a comment in fs/procfs/proc_sysctl.c confirms.
lustre has copied this convention to lnet_debugfs_{read,write},
and then provided a wrapper for handlers - lprocfs_call_handler -
to work around the clumsiness.

It is cleaner to just fold the functionality of lprocfs_call_handler()
into lnet_debugfs_* and let them call the final handler directly.

If these files were ever moved to /proc/sys (which seems unlikely) the
handling in fs/procfs/proc_sysctl.c would need to be fixed to, but
that would not be a bad thing.

So modify all the functions that did use the wrapper to not need it
now that a more sane calling convention is available.

Signed-off-by: Mr. NeilBrown <neilb@suse.de>
Change-Id: I548ed6a3179cdb7cd5c024febd3fee4709285a82
Reviewed-on: https://review.whamcloud.com/44309
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
libcfs/include/libcfs/libcfs.h
libcfs/libcfs/module.c
lnet/lnet/router_proc.c