Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932176AbcLNCta (ORCPT ); Tue, 13 Dec 2016 21:49:30 -0500 Received: from mail-qk0-f196.google.com ([209.85.220.196]:34541 "EHLO mail-qk0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754789AbcLNCt1 (ORCPT ); Tue, 13 Dec 2016 21:49:27 -0500 From: Jia He To: linux-kernel@vger.kernel.org, linux-nfs@vger.kernel.org Cc: "Eric W. Biederman" , Andrew Morton , Dmitry Torokhov , Serge Hallyn , "David S. Miller" , Alexey Dobriyan , Subash Abhinov Kasiviswanathan , Arnaldo Carvalho de Melo , Al Viro , Mel Gorman , Kees Cook , Hugh Dickins , Daniel Bristot de Oliveira , Daniel Cashman , Arnd Bergmann , "J. Bruce Fields" , Jeff Layton , Trond Myklebust , Anna Schumaker , Jia He Subject: [RESEND PATCH v4 2/2] lockd: change the proc_handler for nsm_use_hostnames Date: Wed, 14 Dec 2016 10:49:16 +0800 Message-Id: <1481683756-29276-3-git-send-email-hejianet@gmail.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1481683756-29276-1-git-send-email-hejianet@gmail.com> References: <1481683756-29276-1-git-send-email-hejianet@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 842 Lines: 28 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. Signed-off-by: Jia He --- 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", -- 2.5.5