Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp714555pxm; Fri, 25 Feb 2022 18:05:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJwyq+4oS9vFVsyHls/qkkvNOt2BPUDY0OavSxdPXCXxJbo9CaW2itU3LsJx4qa1Pq57BeCD X-Received: by 2002:a05:6a00:88a:b0:4df:f3a9:b246 with SMTP id q10-20020a056a00088a00b004dff3a9b246mr10337018pfj.83.1645841152983; Fri, 25 Feb 2022 18:05:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645841152; cv=none; d=google.com; s=arc-20160816; b=gn1zJtg/YmncNUcs6/qWKhWMv3vPtZQPLazzUKcFQePJbaD2ayILF867t/Tzpkh9GD IXL4di3Q/ScJNjnXUDrUHkCShgtJTalkbLzWRLu0FhMwDUokXEG9RqQuW9DaZQpE79xm 5B8RJW5tQJCHkjL/SplXyyuRqxDiceNh1AlphtuUMDPNqeArgvhT9hWp9EwucB+hw47+ 6CNmMYwElqv83iLSgUmW8oGg/6uG71yCa85U5SoPnDDijd0DhVXm/C7bIRJoadGS10r5 jFVmh8QVvAI6BrDmgmrL4fZgeN+lAGNmh8EeVtSLW/CYg0hdxA7QkcCkGhbuuctuqXxD BoQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=cScDC19ah8ZHx3gQEwTbfWR0sPCxVKvs7xfVOtyUWM8=; b=JUBQCTQkghmHdxc44JGZK+nKGdOYdZqnEbshYP/ELFdIQZboxxX9qFoxHE3Axksvn2 C1PjCOsdoQPBc+4B1wqGF5fIJ03Ai/hjHYyor2Y0WwtesaTc9gdrm96j6TVwRLocEDRx XyGu0DGmIhrRgcFrURhppoMH2FfG6NyYxX1enlFe97S73dsOlIhVl2vM3B2k6d97tC73 0fbIBgxQN0F+/4Ymo7Id0y0g1DLDIbttTG9iQpWAHf3VMKe6FoMdCnXfvK6qjbtauVxm bQJAVnqmAU/muzwURBaoCU1g9vMDQWl6nFM+IQZxkr7bURuOBhcTu7r6jQ5osFirhPjm Ph1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=szgFg42q; spf=softfail (google.com: domain of transitioning linux-nfs-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id i8-20020a170902c94800b001513cd8eff3si2276780pla.125.2022.02.25.18.05.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Feb 2022 18:05:52 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-nfs-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=szgFg42q; spf=softfail (google.com: domain of transitioning linux-nfs-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6C4D61D7915; Fri, 25 Feb 2022 17:44:24 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233316AbiBYSfS (ORCPT + 99 others); Fri, 25 Feb 2022 13:35:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233300AbiBYSfM (ORCPT ); Fri, 25 Feb 2022 13:35:12 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53D6B1A8CB7 for ; Fri, 25 Feb 2022 10:34:39 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E5A63B8330B for ; Fri, 25 Feb 2022 18:34:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 66F83C340F2 for ; Fri, 25 Feb 2022 18:34:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645814076; bh=Y1ipazY3pl3WZgPz62B3OLONuRP4E1z7/Fuod/m3bP0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=szgFg42qXBc2xL3pV9VWINxGdEzqIZ6G/PFuHwJ/M4JG5xIV9HIFEheFJAN1PXhFa q93JsDCLedKvORP5MvRwGx33vxDYbc2uN8BnzDmqBwUREq64aOaJ80Fm/bSDaByuJa ORWyABMSb/8I4SQPs+F6goldj9LQTBy7qnkSb8zbSlAVTN51x6z7LnV3xtQCWrMDgT eMGZUGOg+qLct4tI2GTVixzP6jdBvsfCX1slio2yYAKhBpUxDbmkldGVXBL7sndu1z FjA+PxRa36FEnlVsS705zTu0sGheFosGhNhFRvkhYlpE22ZUpobHaO3Bg0AQolHSXc VsQeV3guxwdBA== From: trondmy@kernel.org To: linux-nfs@vger.kernel.org Subject: [PATCH v8 02/24] NFS: constify nfs_server_capable() and nfs_have_writebacks() Date: Fri, 25 Feb 2022 13:28:07 -0500 Message-Id: <20220225182829.1236093-3-trondmy@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220225182829.1236093-2-trondmy@kernel.org> References: <20220225182829.1236093-1-trondmy@kernel.org> <20220225182829.1236093-2-trondmy@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: Trond Myklebust Signed-off-by: Trond Myklebust --- include/linux/nfs_fs.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 72a732a5103c..6e10725887d1 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h @@ -363,7 +363,7 @@ static inline void nfs_mark_for_revalidate(struct inode *inode) spin_unlock(&inode->i_lock); } -static inline int nfs_server_capable(struct inode *inode, int cap) +static inline int nfs_server_capable(const struct inode *inode, int cap) { return NFS_SERVER(inode)->caps & cap; } @@ -587,12 +587,11 @@ extern struct nfs_commit_data *nfs_commitdata_alloc(bool never_fail); extern void nfs_commit_free(struct nfs_commit_data *data); bool nfs_commit_end(struct nfs_mds_commit_info *cinfo); -static inline int -nfs_have_writebacks(struct inode *inode) +static inline bool nfs_have_writebacks(const struct inode *inode) { if (S_ISREG(inode->i_mode)) return atomic_long_read(&NFS_I(inode)->nrequests) != 0; - return 0; + return false; } /* -- 2.35.1