From patchwork Fri Jan 18 23:01:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Greear X-Patchwork-Id: 2004851 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 271F3DF280 for ; Fri, 18 Jan 2013 23:01:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752823Ab3ARXBH (ORCPT ); Fri, 18 Jan 2013 18:01:07 -0500 Received: from mail.candelatech.com ([208.74.158.172]:36094 "EHLO ns3.lanforge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751070Ab3ARXBH (ORCPT ); Fri, 18 Jan 2013 18:01:07 -0500 Received: from [192.168.100.226] (firewall.candelatech.com [70.89.124.249]) (authenticated bits=0) by ns3.lanforge.com (8.14.2/8.14.2) with ESMTP id r0IN15Gt013209 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 18 Jan 2013 15:01:05 -0800 Message-ID: <50F9D431.5040600@candelatech.com> Date: Fri, 18 Jan 2013 15:01:05 -0800 From: Ben Greear Organization: Candela Technologies User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Chuck Lever CC: "linux-nfs@vger.kernel.org" Subject: Re: Question on nfs40_discover_server_trunking. References: <50F9BE66.6080608@candelatech.com> <0F001F0E-229D-4314-A42E-84402E4F1FC7@oracle.com> <50F9C5B4.5020000@candelatech.com> <1A56CC87-38FF-47B4-9CA9-7BAE394AF0D2@oracle.com> <50F9CDDF.4070609@candelatech.com> <50F9D1E7.4080203@candelatech.com> In-Reply-To: <50F9D1E7.4080203@candelatech.com> Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Is this OK, or is the NULL assignment just not acceptable? Due to the complexity of this code, I think it is a good idea to initialize the variable... [greearb@fs3 nfs]$ git diff [greearb@fs3 nfs]$ diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c index d6b39a9..cdc99bd 100644 --- a/fs/nfs/nfs4client.c +++ b/fs/nfs/nfs4client.c @@ -185,7 +185,7 @@ struct nfs_client *nfs4_init_client(struct nfs_client *clp, rpc_authflavor_t authflavour) { char buf[INET6_ADDRSTRLEN + 1]; - struct nfs_client *old; + struct nfs_client *old = NULL; int error; if (clp->cl_cons_state == NFS_CS_READY) { diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index c351e6b..7103617 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c @@ -139,6 +139,8 @@ int nfs40_discover_server_trunking(struct nfs_client *clp, switch (status) { case -NFS4ERR_STALE_CLIENTID: set_bit(NFS4CLNT_LEASE_CONFIRM, &clp->cl_state); + nfs4_schedule_state_renewal(clp); + break; case 0: /* Sustain the lease, even if it's empty. If the clientid4 * goes stale it's of no use for trunking discovery. */