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: 114229 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp3508612qgf; Tue, 26 Sep 2017 00:17:02 -0700 (PDT) X-Received: by 10.98.130.200 with SMTP id w191mr10099222pfd.246.1506410222783; Tue, 26 Sep 2017 00:17:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506410222; cv=none; d=google.com; s=arc-20160816; b=UdFhRdEX8Of7TA42r7c1JTBOIgwt9thcM3gDNsBcWms2cjrLOEJ+TFonldCREWO82W cX7PgGpkjl7eJaQDaYbfEhhIJVFdiXju17Gxc4LkW4xnjSB8dnr/l4JBLGlIyZHzLR4N Qm10po9bi5DIrskMt3T6TmVKQS+FMQVqxTVpRcfg9fbzWKJAQFTulETgHfxpQrm+Ky+V llIxjxCvMt5IgUNqnGMgKl0LjresEqCDqRMKWpsLOGZkjcpcaxA4Hy2RnS4fxSBEcjFO NqfHAynBN/bgAEsYSP9tDun11C/tIUHwdlc/NSrJU5OXZCWuZxG4NyUOv0tUaR5GP47d UMBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=OnExeZ2vbTAGagWZT0QqaRGUEXrQ6Hi+mvK5HKGP30Q=; b=ZNg4Guy0ELf3af6wkttcJLYIud6Mhd+Om5Av9XSozMQuXezOnHl3frRF0KuVyjmxht Gn8/1Oz45Cr5xsjcZKmaqo1lzAObRDPv9a4JruPtYL6hWO6wbWC2JnNFIdMfmgZnu+LG Fj5hR639GWEiyuoitFbHYRXycWfldYmkUJ+rGZtRJKqTdLW5JjyR7DSI+5IVVNSEuPm0 1AacFN2nAmBNzz48DDphC84S+Xq+htsQ3MZaJugFuLPrx84B44Pt1ca+AZurXNuGFcBv 9TOc0Lm8oga4t0NigZe+XxJS9lKZ8yVvxd/fNNdGjLjfbUNNABUJ2ZeNSHiqChE13WuK 2bSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sh1ggmQt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f4si5414798pgq.72.2017.09.26.00.17.02; Tue, 26 Sep 2017 00:17:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sh1ggmQt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966957AbdIZHRA (ORCPT + 26 others); Tue, 26 Sep 2017 03:17:00 -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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.13.5 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