/* * `Async' versions of the above service routines. They aren't really, * because we send the callback before the reply proper. I hope this * doesn't break any clients. */ static __be32 nlmsvc_callback(struct svc_rqst *rqstp, u32 proc, struct nlm_args *argp, __be32 (*func)(struct svc_rqst *, struct nlm_args *, struct nlm_res *)) { struct nlm_host *host; struct nlm_rqst *call; __be32 stat; host = nlmsvc_lookup_host(rqstp, argp->lock.caller, argp->lock.len); if (host == NULL) return rpc_system_err; call = nlm_alloc_call(host); if (call == NULL) return rpc_system_err; stat = func(rqstp, argp, &call->a_res); if (stat != 0) { nlm_release_call(call); return stat; } call->a_flags = RPC_TASK_ASYNC; if (nlm_async_reply(call, proc, &nlmsvc_callback_ops) < 0) return rpc_system_err; return rpc_success; }
static void nlmsvc_callback_release(void *data) { lock_kernel(); nlm_release_call(data); unlock_kernel(); }
static void nlm4svc_callback_release(void *data) { nlm_release_call(data); }