linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / fs / lockd / mon.c
index 3fc683f..0edc03e 100644 (file)
@@ -35,10 +35,6 @@ nsm_mon_unmon(struct nlm_host *host, u32 proc, struct nsm_res *res)
        struct rpc_clnt *clnt;
        int             status;
        struct nsm_args args;
-       struct rpc_message msg = {
-               .rpc_argp       = &args,
-               .rpc_resp       = res,
-       };
 
        clnt = nsm_create();
        if (IS_ERR(clnt)) {
@@ -53,8 +49,7 @@ nsm_mon_unmon(struct nlm_host *host, u32 proc, struct nsm_res *res)
        args.proc = NLMPROC_NSM_NOTIFY;
        memset(res, 0, sizeof(*res));
 
-       msg.rpc_proc = &clnt->cl_procinfo[proc];
-       status = rpc_call_sync(clnt, &msg, 0);
+       status = rpc_call(clnt, proc, &args, res, 0);
        if (status < 0)
                printk(KERN_DEBUG "nsm_mon_unmon: rpc failed, status=%d\n",
                        status);
@@ -219,22 +214,18 @@ static struct rpc_procinfo        nsm_procedures[] = {
                .p_encode       = (kxdrproc_t) xdr_encode_mon,
                .p_decode       = (kxdrproc_t) xdr_decode_stat_res,
                .p_bufsiz       = MAX(SM_mon_sz, SM_monres_sz) << 2,
-               .p_statidx      = SM_MON,
-               .p_name         = "MONITOR",
        },
 [SM_UNMON] = {
                .p_proc         = SM_UNMON,
                .p_encode       = (kxdrproc_t) xdr_encode_unmon,
                .p_decode       = (kxdrproc_t) xdr_decode_stat,
                .p_bufsiz       = MAX(SM_mon_id_sz, SM_unmonres_sz) << 2,
-               .p_statidx      = SM_UNMON,
-               .p_name         = "UNMONITOR",
        },
 };
 
 static struct rpc_version      nsm_version1 = {
-               .number         = 1,
-               .nrprocs        = ARRAY_SIZE(nsm_procedures),
+               .number         = 1, 
+               .nrprocs        = sizeof(nsm_procedures)/sizeof(nsm_procedures[0]),
                .procs          = nsm_procedures
 };
 
@@ -247,7 +238,7 @@ static struct rpc_stat              nsm_stats;
 static struct rpc_program      nsm_program = {
                .name           = "statd",
                .number         = SM_PROGRAM,
-               .nrvers         = ARRAY_SIZE(nsm_version),
+               .nrvers         = sizeof(nsm_version)/sizeof(nsm_version[0]),
                .version        = nsm_version,
                .stats          = &nsm_stats
 };