X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fnfsd%2Fnfs4callback.c;h=d828662d737d22569c78fefec1623409f520cb9c;hb=987b0145d94eecf292d8b301228356f44611ab7c;hp=dbaf3f93f3283f45e431e788aa23733f5c34b8b3;hpb=f7ed79d23a47594e7834d66a8f14449796d4f3e6;p=linux-2.6.git diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c index dbaf3f93f..d828662d7 100644 --- a/fs/nfsd/nfs4callback.c +++ b/fs/nfsd/nfs4callback.c @@ -326,8 +326,6 @@ out: .p_encode = (kxdrproc_t) nfs4_xdr_##argtype, \ .p_decode = (kxdrproc_t) nfs4_xdr_##restype, \ .p_bufsiz = MAX(NFS4_##argtype##_sz,NFS4_##restype##_sz) << 2, \ - .p_statidx = NFSPROC4_CB_##call, \ - .p_name = #proc, \ } static struct rpc_procinfo nfs4_cb_procedures[] = { @@ -337,7 +335,7 @@ static struct rpc_procinfo nfs4_cb_procedures[] = { static struct rpc_version nfs_cb_version4 = { .number = 1, - .nrprocs = ARRAY_SIZE(nfs4_cb_procedures), + .nrprocs = sizeof(nfs4_cb_procedures)/sizeof(nfs4_cb_procedures[0]), .procs = nfs4_cb_procedures }; @@ -413,7 +411,7 @@ nfsd4_probe_callback(struct nfs4_client *clp) /* Initialize rpc_program */ program->name = "nfs4_cb"; program->number = cb->cb_prog; - program->nrvers = ARRAY_SIZE(nfs_cb_version); + program->nrvers = sizeof(nfs_cb_version)/sizeof(nfs_cb_version[0]); program->version = nfs_cb_version; program->stats = stat; @@ -441,9 +439,8 @@ nfsd4_probe_callback(struct nfs4_client *clp) goto out_clnt; } - cb->cb_client = clnt; - /* the task holds a reference to the nfs4_client struct */ + cb->cb_client = clnt; atomic_inc(&clp->cl_count); msg.rpc_cred = nfsd4_lookupcred(clp,0); @@ -461,12 +458,13 @@ nfsd4_probe_callback(struct nfs4_client *clp) out_rpciod: atomic_dec(&clp->cl_count); rpciod_down(); - cb->cb_client = NULL; out_clnt: rpc_shutdown_client(clnt); + goto out_err; out_err: dprintk("NFSD: warning: no callback path to client %.*s\n", (int)clp->cl_name.len, clp->cl_name.data); + cb->cb_client = NULL; } static void