NFS: Clean up nfs4_check_serverowner_minor_id()
authorAnna Schumaker <Anna.Schumaker@Netapp.com>
Fri, 7 Apr 2017 18:15:12 +0000 (14:15 -0400)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Thu, 20 Apr 2017 17:39:34 +0000 (13:39 -0400)
Once again, we can remove the function and compare integer values
directly.

Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/nfs4client.c

index 39b8c38b6a68a02aad4fbc14adc90ff2972c920d..4f4f179cb849cdf0c5b0995288e25900a46491df 100644 (file)
@@ -603,25 +603,6 @@ out_major_mismatch:
        return false;
 }
 
-/*
- * Returns true if server minor ids match
- */
-static bool
-nfs4_check_serverowner_minor_id(struct nfs41_server_owner *o1,
-                               struct nfs41_server_owner *o2)
-{
-       /* Check eir_server_owner so_minor_id */
-       if (o1->minor_id != o2->minor_id)
-               goto out_minor_mismatch;
-
-       dprintk("NFS: --> %s server owner minor IDs match\n", __func__);
-       return true;
-
-out_minor_mismatch:
-       dprintk("NFS: --> %s server owner minor IDs do not match\n", __func__);
-       return false;
-}
-
 /*
  * Returns true if the server scopes match
  */
@@ -674,8 +655,7 @@ int nfs4_detect_session_trunking(struct nfs_client *clp,
                goto out_err;
 
        /* Check eir_server_owner so_minor_id */
-       if (!nfs4_check_serverowner_minor_id(clp->cl_serverowner,
-                                            res->server_owner))
+       if (clp->cl_serverowner->minor_id != res->server_owner->minor_id)
                goto out_err;
 
        /* Check eir_server_scope */