Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3256032ybd; Fri, 28 Jun 2019 05:37:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqxMDvPhm71lrANyD2Xzxf3MwTx8NslVz5jzBRSpPFTT24azgluV16yuD9ji7tzkg4cC0QWF X-Received: by 2002:a63:2109:: with SMTP id h9mr9137242pgh.51.1561725453383; Fri, 28 Jun 2019 05:37:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561725453; cv=none; d=google.com; s=arc-20160816; b=WDJlgjPkg2kSGVeM6A9VJZP16Q6UOIvTUWjrz0D3Z0zsFFuROVZHnYHwyKuQfcG1ty OiArED4PNPkT9/Do2+PNM/4twAMK/Goukp1XWYej2gd6geHgBvhwu2KBrEIlNFqKakug r8/tqAqHLMHB4dbg79H3bNQ6t26snVdYp8FT0bIB5wLU1G25Otd+xYcB29AQbScpK9CO 1rLaGjAsv6Ie6m1j6gzhhf/++vYIFuW+bI5Rn1B5jhHtmDuQj6ZIOD5nbcPYVgoOMMcA jRiIJWxP8Xvze+Vie0/Ar4HSN/JnEnWhF6RuXGhZz9jfYipvEEmCZoHfSJkT50348aCz HwTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=GTdEbmCsCrhB2iF4D/ZLQAeN4LOAi0AthsQLs16wsjQ=; b=qHAAhfKc6a1IQgrPXc3d1z3eIlgNijzAsPX8ubF9GlJB0LAE0LDqRLpeFV+1IEuPT3 gIFr5lzEAOPY1eFFRjoF8ohEjU4DP/SO2Bps3u/hOGkjj8Sd1DZQmu3+ew3Mw0kUFZ3f Vcip5tR7wY9pz3g++cYz4B/Zlw2eHaasrnCK1gc82ARSYJYXijsJG03oo656E12RELU1 58kyOA18enGYHSDz0wQQhHquzqN7SQ/1c+JRoI8Vp6wft3FWIeq1KNGJX3IRoRM7KV17 BOaA3zwdA0qDDp51Ez1vOqHGcg3KJlt8b4M4wrv5M5FRlRkBRUZpcGnAqSTtczvrewoK O71A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f71si2176865pgc.307.2019.06.28.05.37.18; Fri, 28 Jun 2019 05:37:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726696AbfF1MhD (ORCPT + 99 others); Fri, 28 Jun 2019 08:37:03 -0400 Received: from mx3.molgen.mpg.de ([141.14.17.11]:60477 "EHLO mx1.molgen.mpg.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726578AbfF1MhD (ORCPT ); Fri, 28 Jun 2019 08:37:03 -0400 Received: from theinternet.molgen.mpg.de (theinternet.molgen.mpg.de [141.14.31.7]) by mx.molgen.mpg.de (Postfix) with ESMTP id 5BB3B2066958F; Fri, 28 Jun 2019 14:37:01 +0200 (CEST) From: Donald Buczek To: linux-nfs@vger.kernel.org, trond.myklebust@hammerspace.com, anna.schumaker@netapp.com Cc: Donald Buczek Subject: [PATCH 3/4 RESEND] nfs4: Move nfs4_setup_state_renewal Date: Fri, 28 Jun 2019 14:36:39 +0200 Message-Id: <20190628123640.8715-4-buczek@molgen.mpg.de> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190628123640.8715-1-buczek@molgen.mpg.de> References: <20190628123640.8715-1-buczek@molgen.mpg.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org The function nfs4_setup_state_renewal is to be used by nfs4_init_clientid. Move it further to the top of the source file to include it regardles of CONFIG_NFS_V4_1 and to save a forward declaration. No code changed. Signed-off-by: Donald Buczek --- fs/nfs/nfs4state.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index 778ebfb00d13..c2df257f426f 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c @@ -87,6 +87,27 @@ const nfs4_stateid current_stateid = { static DEFINE_MUTEX(nfs_clid_init_mutex); +static int nfs4_setup_state_renewal(struct nfs_client *clp) +{ + int status; + struct nfs_fsinfo fsinfo; + unsigned long now; + + if (!test_bit(NFS_CS_CHECK_LEASE_TIME, &clp->cl_res_state)) { + nfs4_schedule_state_renewal(clp); + return 0; + } + + now = jiffies; + status = nfs4_proc_get_lease_time(clp, &fsinfo); + if (status == 0) { + nfs4_set_lease_period(clp, fsinfo.lease_time * HZ, now); + nfs4_schedule_state_renewal(clp); + } + + return status; +} + int nfs4_init_clientid(struct nfs_client *clp, const struct cred *cred) { struct nfs4_setclientid_res clid = { @@ -286,27 +307,6 @@ static int nfs4_begin_drain_session(struct nfs_client *clp) #if defined(CONFIG_NFS_V4_1) -static int nfs4_setup_state_renewal(struct nfs_client *clp) -{ - int status; - struct nfs_fsinfo fsinfo; - unsigned long now; - - if (!test_bit(NFS_CS_CHECK_LEASE_TIME, &clp->cl_res_state)) { - nfs4_schedule_state_renewal(clp); - return 0; - } - - now = jiffies; - status = nfs4_proc_get_lease_time(clp, &fsinfo); - if (status == 0) { - nfs4_set_lease_period(clp, fsinfo.lease_time * HZ, now); - nfs4_schedule_state_renewal(clp); - } - - return status; -} - static void nfs41_finish_session_reset(struct nfs_client *clp) { clear_bit(NFS4CLNT_LEASE_CONFIRM, &clp->cl_state); -- 2.22.0