Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1542544

Re: [PATCH v5 2/2] lockd: change the proc_handler for nsm_use_hostnames

From Pan Xinhui <xinhui@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject Re: [PATCH v5 2/2] lockd: change the proc_handler for nsm_use_hostnames
Date 2016-12-15 09:20 +0100
Message-ID <sOzqF-3rd-1@gated-at.bofh.it> (permalink)
References <sOyEh-2VZ-1@gated-at.bofh.it> <sOyEh-2VZ-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



在 2016/12/15 15:24, Jia He 写道:
> nsm_use_hostnames is a module parameter and it will be exported to sysctl
> procfs. This is to let user sometimes change it from userspace. But the
> minimal unit for sysctl procfs read/write it sizeof(int).
					^^^is^^^
> In big endian system, the converting from/to  bool to/from int will cause
> error for proc items.
>
> This patch use a new proc_handler proc_dobool to fixe it.
						 ^^^fix^^^	
> Signed-off-by: Jia He <hejianet@gmail.com>
> ---
other than that is okay for me.

Reviewed-by: Pan Xinhui <xinhui.pan@linux.vnet.ibm.com>

>  fs/lockd/svc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
> index fc4084e..bd6fcf9 100644
> --- a/fs/lockd/svc.c
> +++ b/fs/lockd/svc.c
> @@ -561,7 +561,7 @@ static struct ctl_table nlm_sysctls[] = {
>  		.data		= &nsm_use_hostnames,
>  		.maxlen		= sizeof(int),
>  		.mode		= 0644,
> -		.proc_handler	= proc_dointvec,
> +		.proc_handler	= proc_dobool,
>  	},
>  	{
>  		.procname	= "nsm_local_state",
>

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v5 0/2] change the proc handler for nsm_use_hostnames Jia He <hejianet@gmail.com> - 2016-12-15 08:30 +0100
  [PATCH v5 2/2] lockd: change the proc_handler for nsm_use_hostnames Jia He <hejianet@gmail.com> - 2016-12-15 08:30 +0100
    Re: [PATCH v5 2/2] lockd: change the proc_handler for  nsm_use_hostnames Pan Xinhui <xinhui@linux.vnet.ibm.com> - 2016-12-15 09:20 +0100
  [PATCH v5 1/2] sysctl: introduce new proc handler proc_dobool Jia He <hejianet@gmail.com> - 2016-12-15 08:30 +0100
    Re: [PATCH v5 1/2] sysctl: introduce new proc handler proc_dobool Pan Xinhui <xinhui@linux.vnet.ibm.com> - 2016-12-15 09:20 +0100

csiph-web