{
struct nlm_args *argp = rqstp->rq_argp;
struct nlm_res *resp = rqstp->rq_resp;
+ struct nlm_lock *lock = &argp->lock;
struct nlm_host *host;
struct nlm_file *file;
}
/* Obtain client and file */
- if ((resp->status = nlm4svc_retrieve_args(rqstp, argp, &host, &file)))
+ locks_init_lock(&lock->fl);
+ lock->svid = ~(u32)0;
+ resp->status = nlm4svc_retrieve_args(rqstp, argp, &host, &file);
+ if (resp->status)
return resp->status == nlm__int__drop_reply ?
rpc_drop_reply : rpc_success;
resp->status = nlmsvc_share_file(host, file, argp);
dprintk("lockd: SHARE status %d\n", ntohl(resp->status));
- nlmsvc_release_lockowner(&argp->lock);
+ nlmsvc_release_lockowner(lock);
nlmsvc_release_host(host);
nlm_release_file(file);
return rpc_success;
{
struct nlm_args *argp = rqstp->rq_argp;
struct nlm_res *resp = rqstp->rq_resp;
+ struct nlm_lock *lock = &argp->lock;
struct nlm_host *host;
struct nlm_file *file;
}
/* Obtain client and file */
- if ((resp->status = nlm4svc_retrieve_args(rqstp, argp, &host, &file)))
+ locks_init_lock(&lock->fl);
+ lock->svid = ~(u32)0;
+ resp->status = nlm4svc_retrieve_args(rqstp, argp, &host, &file);
+ if (resp->status)
return resp->status == nlm__int__drop_reply ?
rpc_drop_reply : rpc_success;
resp->status = nlmsvc_unshare_file(host, file, argp);
dprintk("lockd: UNSHARE status %d\n", ntohl(resp->status));
- nlmsvc_release_lockowner(&argp->lock);
+ nlmsvc_release_lockowner(lock);
nlmsvc_release_host(host);
nlm_release_file(file);
return rpc_success;
struct nlm_args *argp = rqstp->rq_argp;
struct nlm_lock *lock = &argp->lock;
- locks_init_lock(&lock->fl);
- lock->svid = ~(u32)0;
-
if (!svcxdr_decode_cookie(xdr, &argp->cookie))
return false;
if (!svcxdr_decode_string(xdr, &lock->caller, &lock->len))