Message ID | 1481786661-973-3-git-send-email-hejianet@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-nfs-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CC75260825 for <patchwork-linux-nfs@patchwork.kernel.org>; Thu, 15 Dec 2016 08:21:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB21228746 for <patchwork-linux-nfs@patchwork.kernel.org>; Thu, 15 Dec 2016 08:21:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AFB0C2874B; Thu, 15 Dec 2016 08:21:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A8C128746 for <patchwork-linux-nfs@patchwork.kernel.org>; Thu, 15 Dec 2016 08:21:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755406AbcLOIVn (ORCPT <rfc822;patchwork-linux-nfs@patchwork.kernel.org>); Thu, 15 Dec 2016 03:21:43 -0500 Received: from mail-qt0-f195.google.com ([209.85.216.195]:35353 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752990AbcLOIVm (ORCPT <rfc822; linux-nfs@vger.kernel.org>); Thu, 15 Dec 2016 03:21:42 -0500 Received: by mail-qt0-f195.google.com with SMTP id m48so5955259qta.2 for <linux-nfs@vger.kernel.org>; Thu, 15 Dec 2016 00:21:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=wMeDgatpaoFALldCcRLeixBQhT/60vg5dYey9plhoeU=; b=RB/+y4yz9o25qN4KlpjqZ/R6WbOuAvEXVL2SzD9Y0bb+o04W//L1MuAzWHIQbv3XNB 9aXQH57PxG0Xg06FGC6HJ9i2NF5EAX5bt8YIOY0pp6l768nzz01euVkPrillD/RyXQDA 1khCnA1xeZjzP0dqRWVA7D8WwyiuNGOuMLNpA+rEGa+Sdg5nOYysD5dabvnESoi55hwH 1ArMwayCVHO3n5lEkUmStQQPSNeplkXHSUb6DzJwaEu466GSEjt/z1ES4xDRMZ4ih+Ds uhtlGiSoTy0IgKco06OTTyS3BQTL94XeJBRL6493eSKM/R3LPZ00dvmC9OiIYrErUuPn ub9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=wMeDgatpaoFALldCcRLeixBQhT/60vg5dYey9plhoeU=; b=MaiuNK9R0VWKLqmsfrMNRVXzniG90NBb4dvKEym+yLpk0LiI8zXFUNfMP++ie3phBK 2RkEmSEwv3UEab48tB2k/5IPYK6/apfb9VqcHz+4Lluq9Pzjm/YKsZOQZVGzOrXKcejA f/CQeE6rXseyKt8uU7oHa+M7LXcAG3Xt3FWwpeK4SVoQhpKWo9IivMyFLLxtg9Jq4Qoy pQisPkulXheRq0n7vW10tKk79/IQs3WcmmwMHbP6rmxApBMN97LC8Avhue+qK8XqhcBh o1qnh5NFMCjAbp5CQip8hS5qulFw0iGmNhrnXayMnk2ZGRWxfh1yR6Z9OaTd+e+JtRFQ 5V8w== X-Gm-Message-State: AIkVDXKJnNF0a568fUJgTlJt3pdGFi9QfaiRV9BK3JiGB4/H45td2KP7JN/1fstSe5hfXw== X-Received: by 10.237.50.163 with SMTP id z32mr776294qtd.71.1481786678996; Wed, 14 Dec 2016 23:24:38 -0800 (PST) Received: from localhost.localdomain.localdomain (bi-03pt2.bluebird.ibm.com. [129.42.208.173]) by smtp.gmail.com with ESMTPSA id s65sm407115qtd.2.2016.12.14.23.24.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Dec 2016 23:24:38 -0800 (PST) From: Jia He <hejianet@gmail.com> To: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org Cc: "Eric W. Biederman" <ebiederm@xmission.com>, Andrew Morton <akpm@linux-foundation.org>, Dmitry Torokhov <dmitry.torokhov@gmail.com>, Serge Hallyn <serge@hallyn.com>, "David S. Miller" <davem@davemloft.net>, Alexey Dobriyan <adobriyan@gmail.com>, Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>, Arnaldo Carvalho de Melo <acme@redhat.com>, Al Viro <viro@zeniv.linux.org.uk>, Mel Gorman <mgorman@techsingularity.net>, Kees Cook <keescook@chromium.org>, Hugh Dickins <hughd@google.com>, Daniel Bristot de Oliveira <bristot@redhat.com>, Daniel Cashman <dcashman@google.com>, Arnd Bergmann <arnd@arndb.de>, "J. Bruce Fields" <bfields@fieldses.org>, Jeff Layton <jlayton@poochiereds.net>, Trond Myklebust <trond.myklebust@primarydata.com>, Anna Schumaker <anna.schumaker@netapp.com>, Jia He <hejianet@gmail.com> Subject: [PATCH v5 2/2] lockd: change the proc_handler for nsm_use_hostnames Date: Thu, 15 Dec 2016 15:24:21 +0800 Message-Id: <1481786661-973-3-git-send-email-hejianet@gmail.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1481786661-973-1-git-send-email-hejianet@gmail.com> References: <1481786661-973-1-git-send-email-hejianet@gmail.com> Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: <linux-nfs.vger.kernel.org> X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
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",
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 fixe it. Signed-off-by: Jia He <hejianet@gmail.com> --- fs/lockd/svc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)