diff mbox

Question on nfs40_discover_server_trunking.

Message ID 50F9D431.5040600@candelatech.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ben Greear Jan. 18, 2013, 11:01 p.m. UTC
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 mbox

Patch

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. */