From patchwork Tue Sep 26 07:14:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 9971259 Return-Path: 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 AFF4D60365 for ; Tue, 26 Sep 2017 07:17:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9AAA71FF1D for ; Tue, 26 Sep 2017 07:17:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8F8F523B3C; Tue, 26 Sep 2017 07:17:12 +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 35B7F1FF1D for ; Tue, 26 Sep 2017 07:17:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966928AbdIZHQ7 (ORCPT ); Tue, 26 Sep 2017 03:16:59 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:50928 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966745AbdIZHQV (ORCPT ); Tue, 26 Sep 2017 03:16:21 -0400 Received: by mail-wm0-f65.google.com with SMTP id b195so4355318wmb.5; Tue, 26 Sep 2017 00:16:20 -0700 (PDT) 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=OnExeZ2vbTAGagWZT0QqaRGUEXrQ6Hi+mvK5HKGP30Q=; b=sh1ggmQtyhor+drjFEN+Oq49n/aUSOQooBZJVGlHJ9MbkYzY04CGlwJpzuA6kLH42r oRWVia/LVT/6wqqjw/alGpEq3XQ7mSlJp5gq9arr/suO18qZrDoY+UvbpVL1xoqKPyb9 DFwTGmR0F6c59X9O6cCa93l+T211oFfr5araPk+5eCpGywKtbJEvzaVfmeNPOVDqxz3v F+QQY3thhhFI4gR6Q2EnDzvA9+PHzZKUUBi4ZjqQ0QYykMnItvZlNBQT5wzVP3DeKNz/ 39XbjZAe5FWGkUQTpdq82wj7N4IsafXi9AvRwchK78uFC82x/BmO8xuPleYg1MM21fkA atCg== 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=OnExeZ2vbTAGagWZT0QqaRGUEXrQ6Hi+mvK5HKGP30Q=; b=sQDU1pO/SCPUTurCOhxvkqByKPliCEBsFtveUu2qz5NGhTkuZ6KKD9lDU1KyZB4IpE yefaDioRudE7zZCZjOGXkZhWP+uAt05T7qGPk6+z0073IDLo03XYhN0Y8NHmUZNpEOu8 c1j78xFCw7uS2C3mBP7ZzQJ1A/K9QF8rjQwPcScLipc/VVWqLUp2J9tYr0r+9HrRCc0+ Ef7NOg3t4lSvHr3HVCacDu4vxhXPYqzUGxgTzGemFTxWvIHyLfzncL/wu0vL+8GpfCT2 6zHQxrwK5/8RIn6BDX+e35ncUqP106ByA8pLlxX1BUoEffs0mdgxOmXFUVXuEI8byjCx 4awg== X-Gm-Message-State: AHPjjUhpzQvOR90dx51Kn25QTmdnAZkZ82UFMN1EBkBwfHvYtUJdOTKM 1XCKxdibv6rLGKF4BIO8hO4= X-Google-Smtp-Source: AOwi7QA7Qb58rnydLA/jJZScmiaovPc3G9otn5k3OUWCCjot5MwQfcCTHvK1mBKHGoUODio3SGhYPw== X-Received: by 10.28.175.197 with SMTP id y188mr1989817wme.20.1506410179639; Tue, 26 Sep 2017 00:16:19 -0700 (PDT) Received: from Red.local (LFbn-MAR-1-580-96.w90-118.abo.wanadoo.fr. [90.118.159.96]) by smtp.googlemail.com with ESMTPSA id l91sm11640031wrc.16.2017.09.26.00.16.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 26 Sep 2017 00:16:19 -0700 (PDT) From: Corentin Labbe To: trond.myklebust@primarydata.com, anna.schumaker@netapp.com, bfields@fieldses.org, jlayton@poochiereds.net, viro@zeniv.linux.org.uk Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Corentin Labbe Subject: [PATCH 3/3] nfs_common: convert int to bool Date: Tue, 26 Sep 2017 09:14:07 +0200 Message-Id: <20170926071407.31719-4-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170926071407.31719-1-clabbe.montjoie@gmail.com> References: <20170926071407.31719-1-clabbe.montjoie@gmail.com> Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since __state_in_grace return only true/false, make it return bool instead of int. Same change for the two user of it, locks_in_grace/opens_in_grace Signed-off-by: Corentin Labbe --- fs/nfs_common/grace.c | 10 +++++----- include/linux/fs.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/fs/nfs_common/grace.c b/fs/nfs_common/grace.c index c030cd618b99..897b299db55e 100644 --- a/fs/nfs_common/grace.c +++ b/fs/nfs_common/grace.c @@ -55,7 +55,7 @@ locks_end_grace(struct lock_manager *lm) } EXPORT_SYMBOL_GPL(locks_end_grace); -static int +static bool __state_in_grace(struct net *net, bool open) { struct list_head *grace_list = net_generic(net, grace_net_id); @@ -78,15 +78,15 @@ __state_in_grace(struct net *net, bool open) * to answer ordinary lock requests, and when they should accept only * lock reclaims. */ -int locks_in_grace(struct net *net) +bool locks_in_grace(struct net *net) { - return __state_in_grace(net, 0); + return __state_in_grace(net, false); } EXPORT_SYMBOL_GPL(locks_in_grace); -int opens_in_grace(struct net *net) +bool opens_in_grace(struct net *net) { - return __state_in_grace(net, 1); + return __state_in_grace(net, true); } EXPORT_SYMBOL_GPL(opens_in_grace); diff --git a/include/linux/fs.h b/include/linux/fs.h index 8a84a45ecbf9..df843e8c9b50 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -970,8 +970,8 @@ struct lock_manager { struct net; void locks_start_grace(struct net *, struct lock_manager *); void locks_end_grace(struct lock_manager *); -int locks_in_grace(struct net *); -int opens_in_grace(struct net *); +bool locks_in_grace(struct net *); +bool opens_in_grace(struct net *); /* that will die - we need it for nfs_lock_info */ #include