Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757666AbcLOIMn (ORCPT ); Thu, 15 Dec 2016 03:12:43 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:58855 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1757583AbcLOIMX (ORCPT ); Thu, 15 Dec 2016 03:12:23 -0500 Subject: Re: [PATCH v5 2/2] lockd: change the proc_handler for nsm_use_hostnames To: Jia He , linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org References: <1481786661-973-1-git-send-email-hejianet@gmail.com> <1481786661-973-3-git-send-email-hejianet@gmail.com> 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 From: Pan Xinhui Date: Thu, 15 Dec 2016 16:11:56 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <1481786661-973-3-git-send-email-hejianet@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16121508-0040-0000-0000-000002D853E2 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16121508-0041-0000-0000-00000BE549F1 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-12-15_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=2 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1612150131 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1053 Lines: 35 在 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 > --- other than that is okay for me. Reviewed-by: Pan Xinhui > 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", >