aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2012-05-21 22:44:58 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-05-22 16:45:44 -0400
commit177313f1498dd66b551dccadc98331b3fc3b09a4 (patch)
tree203c83e35cbda914ae74b1ad794365f3fc65a113 /fs/nfs
parent73ea666c2bb536f2862cefdb3e014ed62b262ba5 (diff)
NFS: Clean up return code checking in nfs4_proc_exchange_id()
Clean up: update to use matching types in "if" expressions. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/nfs4proc.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index daa4e1b17313..ab6b2e5c923e 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -5102,30 +5102,30 @@ int nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred)
5102 5102
5103 res.server_scope = kzalloc(sizeof(struct nfs41_server_scope), 5103 res.server_scope = kzalloc(sizeof(struct nfs41_server_scope),
5104 GFP_KERNEL); 5104 GFP_KERNEL);
5105 if (unlikely(!res.server_scope)) { 5105 if (unlikely(res.server_scope == NULL)) {
5106 status = -ENOMEM; 5106 status = -ENOMEM;
5107 goto out; 5107 goto out;
5108 } 5108 }
5109 5109
5110 res.impl_id = kzalloc(sizeof(struct nfs41_impl_id), GFP_KERNEL); 5110 res.impl_id = kzalloc(sizeof(struct nfs41_impl_id), GFP_KERNEL);
5111 if (unlikely(!res.impl_id)) { 5111 if (unlikely(res.impl_id == NULL)) {
5112 status = -ENOMEM; 5112 status = -ENOMEM;
5113 goto out_server_scope; 5113 goto out_server_scope;
5114 } 5114 }
5115 5115
5116 status = rpc_call_sync(clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT); 5116 status = rpc_call_sync(clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT);
5117 if (!status) 5117 if (status == 0)
5118 status = nfs4_check_cl_exchange_flags(clp->cl_exchange_flags); 5118 status = nfs4_check_cl_exchange_flags(clp->cl_exchange_flags);
5119 5119
5120 if (!status) { 5120 if (status == 0) {
5121 /* use the most recent implementation id */ 5121 /* use the most recent implementation id */
5122 kfree(clp->cl_implid); 5122 kfree(clp->cl_implid);
5123 clp->cl_implid = res.impl_id; 5123 clp->cl_implid = res.impl_id;
5124 } else 5124 } else
5125 kfree(res.impl_id); 5125 kfree(res.impl_id);
5126 5126
5127 if (!status) { 5127 if (status == 0) {
5128 if (clp->cl_serverscope && 5128 if (clp->cl_serverscope != NULL &&
5129 !nfs41_same_server_scope(clp->cl_serverscope, 5129 !nfs41_same_server_scope(clp->cl_serverscope,
5130 res.server_scope)) { 5130 res.server_scope)) {
5131 dprintk("%s: server_scope mismatch detected\n", 5131 dprintk("%s: server_scope mismatch detected\n",
@@ -5135,7 +5135,7 @@ int nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred)
5135 clp->cl_serverscope = NULL; 5135 clp->cl_serverscope = NULL;
5136 } 5136 }
5137 5137
5138 if (!clp->cl_serverscope) { 5138 if (clp->cl_serverscope == NULL) {
5139 clp->cl_serverscope = res.server_scope; 5139 clp->cl_serverscope = res.server_scope;
5140 goto out; 5140 goto out;
5141 } 5141 }
@@ -5144,7 +5144,7 @@ int nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred)
5144out_server_scope: 5144out_server_scope:
5145 kfree(res.server_scope); 5145 kfree(res.server_scope);
5146out: 5146out:
5147 if (clp->cl_implid) 5147 if (clp->cl_implid != NULL)
5148 dprintk("%s: Server Implementation ID: " 5148 dprintk("%s: Server Implementation ID: "
5149 "domain: %s, name: %s, date: %llu,%u\n", 5149 "domain: %s, name: %s, date: %llu,%u\n",
5150 __func__, clp->cl_implid->domain, clp->cl_implid->name, 5150 __func__, clp->cl_implid->domain, clp->cl_implid->name,