Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

lockd: change the proc_handler for nsm_use_hostnames

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).
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 fix it.

Signed-off-by: Jia He <hejianet@gmail.com>
Reviewed-by: Pan Xinhui <xinhui.pan@linux.vnet.ibm.com>
[thuth: Fix typo in commit message]
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>

authored by

Jia He and committed by
Chuck Lever
d02a3a2c a2071573

+1 -1
+1 -1
fs/lockd/svc.c
··· 584 584 .data = &nsm_use_hostnames, 585 585 .maxlen = sizeof(int), 586 586 .mode = 0644, 587 - .proc_handler = proc_dointvec, 587 + .proc_handler = proc_dobool, 588 588 }, 589 589 { 590 590 .procname = "nsm_local_state",