summaryrefslogtreecommitdiffstats
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)
downloadop-kernel-dev-177313f1498dd66b551dccadc98331b3fc3b09a4.zip
op-kernel-dev-177313f1498dd66b551dccadc98331b3fc3b09a4.tar.gz
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 daa4e1b..ab6b2e5 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)
res.server_scope = kzalloc(sizeof(struct nfs41_server_scope),
GFP_KERNEL);
- if (unlikely(!res.server_scope)) {
+ if (unlikely(res.server_scope == NULL)) {
status = -ENOMEM;
goto out;
}
res.impl_id = kzalloc(sizeof(struct nfs41_impl_id), GFP_KERNEL);
- if (unlikely(!res.impl_id)) {
+ if (unlikely(res.impl_id == NULL)) {
status = -ENOMEM;
goto out_server_scope;
}
status = rpc_call_sync(clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT);
- if (!status)
+ if (status == 0)
status = nfs4_check_cl_exchange_flags(clp->cl_exchange_flags);
- if (!status) {
+ if (status == 0) {
/* use the most recent implementation id */
kfree(clp->cl_implid);
clp->cl_implid = res.impl_id;
} else
kfree(res.impl_id);
- if (!status) {
- if (clp->cl_serverscope &&
+ if (status == 0) {
+ if (clp->cl_serverscope != NULL &&
!nfs41_same_server_scope(clp->cl_serverscope,
res.server_scope)) {
dprintk("%s: server_scope mismatch detected\n",
@@ -5135,7 +5135,7 @@ int nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred)
clp->cl_serverscope = NULL;
}
- if (!clp->cl_serverscope) {
+ if (clp->cl_serverscope == NULL) {
clp->cl_serverscope = res.server_scope;
goto out;
}
@@ -5144,7 +5144,7 @@ int nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred)
out_server_scope:
kfree(res.server_scope);
out:
- if (clp->cl_implid)
+ if (clp->cl_implid != NULL)
dprintk("%s: Server Implementation ID: "
"domain: %s, name: %s, date: %llu,%u\n",
__func__, clp->cl_implid->domain, clp->cl_implid->name,
OpenPOWER on IntegriCloud