* };
*/
static void encode_nlm_holder(struct xdr_stream *xdr,
- const struct nlm_res *result)
+ const struct lockd_res *result)
{
const struct lockd_lock *lock = &result->lock;
u32 l_offset, l_len;
*p = cpu_to_be32(l_len);
}
-static int decode_nlm_holder(struct xdr_stream *xdr, struct nlm_res *result)
+static int decode_nlm_holder(struct xdr_stream *xdr, struct lockd_res *result)
{
struct lockd_lock *lock = &result->lock;
struct file_lock *fl = &lock->fl;
struct xdr_stream *xdr,
const void *data)
{
- const struct nlm_res *result = data;
+ const struct lockd_res *result = data;
encode_cookie(xdr, &result->cookie);
encode_nlm_stat(xdr, result->status);
* };
*/
static void encode_nlm_testrply(struct xdr_stream *xdr,
- const struct nlm_res *result)
+ const struct lockd_res *result)
{
if (result->status == nlm_lck_denied)
encode_nlm_holder(xdr, result);
struct xdr_stream *xdr,
const void *data)
{
- const struct nlm_res *result = data;
+ const struct lockd_res *result = data;
encode_cookie(xdr, &result->cookie);
encode_nlm_stat(xdr, result->status);
* };
*/
static int decode_nlm_testrply(struct xdr_stream *xdr,
- struct nlm_res *result)
+ struct lockd_res *result)
{
int error;
struct xdr_stream *xdr,
void *data)
{
- struct nlm_res *result = data;
+ struct lockd_res *result = data;
int error;
error = decode_cookie(xdr, &result->cookie);
struct xdr_stream *xdr,
void *data)
{
- struct nlm_res *result = data;
+ struct lockd_res *result = data;
int error;
error = decode_cookie(xdr, &result->cookie);
* TEST: Check for conflicting lock
*/
static __be32
-__nlmsvc_proc_test(struct svc_rqst *rqstp, struct nlm_res *resp)
+__nlmsvc_proc_test(struct svc_rqst *rqstp, struct lockd_res *resp)
{
struct lockd_args *argp = rqstp->rq_argp;
struct nlm_host *host;
}
static __be32
-__nlmsvc_proc_lock(struct svc_rqst *rqstp, struct nlm_res *resp)
+__nlmsvc_proc_lock(struct svc_rqst *rqstp, struct lockd_res *resp)
{
struct lockd_args *argp = rqstp->rq_argp;
struct nlm_host *host;
}
static __be32
-__nlmsvc_proc_cancel(struct svc_rqst *rqstp, struct nlm_res *resp)
+__nlmsvc_proc_cancel(struct svc_rqst *rqstp, struct lockd_res *resp)
{
struct lockd_args *argp = rqstp->rq_argp;
struct nlm_host *host;
* UNLOCK: release a lock
*/
static __be32
-__nlmsvc_proc_unlock(struct svc_rqst *rqstp, struct nlm_res *resp)
+__nlmsvc_proc_unlock(struct svc_rqst *rqstp, struct lockd_res *resp)
{
struct lockd_args *argp = rqstp->rq_argp;
struct nlm_host *host;
* was granted
*/
static __be32
-__nlmsvc_proc_granted(struct svc_rqst *rqstp, struct nlm_res *resp)
+__nlmsvc_proc_granted(struct svc_rqst *rqstp, struct lockd_res *resp)
{
struct lockd_args *argp = rqstp->rq_argp;
* doesn't break any clients.
*/
static __be32 nlmsvc_callback(struct svc_rqst *rqstp, u32 proc,
- __be32 (*func)(struct svc_rqst *, struct nlm_res *))
+ __be32 (*func)(struct svc_rqst *, struct lockd_res *))
{
struct lockd_args *argp = rqstp->rq_argp;
struct nlm_host *host;
nlmsvc_proc_share(struct svc_rqst *rqstp)
{
struct lockd_args *argp = rqstp->rq_argp;
- struct nlm_res *resp = rqstp->rq_resp;
+ struct lockd_res *resp = rqstp->rq_resp;
struct nlm_host *host;
struct nlm_file *file;
nlmsvc_proc_unshare(struct svc_rqst *rqstp)
{
struct lockd_args *argp = rqstp->rq_argp;
- struct nlm_res *resp = rqstp->rq_resp;
+ struct lockd_res *resp = rqstp->rq_resp;
struct nlm_host *host;
struct nlm_file *file;
static __be32
nlmsvc_proc_granted_res(struct svc_rqst *rqstp)
{
- struct nlm_res *argp = rqstp->rq_argp;
+ struct lockd_res *argp = rqstp->rq_argp;
if (!nlmsvc_ops)
return rpc_success;
.pc_encode = nlmsvc_encode_testres,
.pc_argsize = sizeof(struct lockd_args),
.pc_argzero = sizeof(struct lockd_args),
- .pc_ressize = sizeof(struct nlm_res),
+ .pc_ressize = sizeof(struct lockd_res),
.pc_xdrressize = Ck+St+2+No+Rg,
.pc_name = "TEST",
},
.pc_encode = nlmsvc_encode_res,
.pc_argsize = sizeof(struct lockd_args),
.pc_argzero = sizeof(struct lockd_args),
- .pc_ressize = sizeof(struct nlm_res),
+ .pc_ressize = sizeof(struct lockd_res),
.pc_xdrressize = Ck+St,
.pc_name = "LOCK",
},
.pc_encode = nlmsvc_encode_res,
.pc_argsize = sizeof(struct lockd_args),
.pc_argzero = sizeof(struct lockd_args),
- .pc_ressize = sizeof(struct nlm_res),
+ .pc_ressize = sizeof(struct lockd_res),
.pc_xdrressize = Ck+St,
.pc_name = "CANCEL",
},
.pc_encode = nlmsvc_encode_res,
.pc_argsize = sizeof(struct lockd_args),
.pc_argzero = sizeof(struct lockd_args),
- .pc_ressize = sizeof(struct nlm_res),
+ .pc_ressize = sizeof(struct lockd_res),
.pc_xdrressize = Ck+St,
.pc_name = "UNLOCK",
},
.pc_encode = nlmsvc_encode_res,
.pc_argsize = sizeof(struct lockd_args),
.pc_argzero = sizeof(struct lockd_args),
- .pc_ressize = sizeof(struct nlm_res),
+ .pc_ressize = sizeof(struct lockd_res),
.pc_xdrressize = Ck+St,
.pc_name = "GRANTED",
},
.pc_func = nlmsvc_proc_null,
.pc_decode = nlmsvc_decode_void,
.pc_encode = nlmsvc_encode_void,
- .pc_argsize = sizeof(struct nlm_res),
- .pc_argzero = sizeof(struct nlm_res),
+ .pc_argsize = sizeof(struct lockd_res),
+ .pc_argzero = sizeof(struct lockd_res),
.pc_ressize = sizeof(struct nlm_void),
.pc_xdrressize = St,
.pc_name = "TEST_RES",
.pc_func = nlmsvc_proc_null,
.pc_decode = nlmsvc_decode_void,
.pc_encode = nlmsvc_encode_void,
- .pc_argsize = sizeof(struct nlm_res),
- .pc_argzero = sizeof(struct nlm_res),
+ .pc_argsize = sizeof(struct lockd_res),
+ .pc_argzero = sizeof(struct lockd_res),
.pc_ressize = sizeof(struct nlm_void),
.pc_xdrressize = St,
.pc_name = "LOCK_RES",
.pc_func = nlmsvc_proc_null,
.pc_decode = nlmsvc_decode_void,
.pc_encode = nlmsvc_encode_void,
- .pc_argsize = sizeof(struct nlm_res),
- .pc_argzero = sizeof(struct nlm_res),
+ .pc_argsize = sizeof(struct lockd_res),
+ .pc_argzero = sizeof(struct lockd_res),
.pc_ressize = sizeof(struct nlm_void),
.pc_xdrressize = St,
.pc_name = "CANCEL_RES",
.pc_func = nlmsvc_proc_null,
.pc_decode = nlmsvc_decode_void,
.pc_encode = nlmsvc_encode_void,
- .pc_argsize = sizeof(struct nlm_res),
- .pc_argzero = sizeof(struct nlm_res),
+ .pc_argsize = sizeof(struct lockd_res),
+ .pc_argzero = sizeof(struct lockd_res),
.pc_ressize = sizeof(struct nlm_void),
.pc_xdrressize = St,
.pc_name = "UNLOCK_RES",
.pc_func = nlmsvc_proc_granted_res,
.pc_decode = nlmsvc_decode_res,
.pc_encode = nlmsvc_encode_void,
- .pc_argsize = sizeof(struct nlm_res),
- .pc_argzero = sizeof(struct nlm_res),
+ .pc_argsize = sizeof(struct lockd_res),
+ .pc_argzero = sizeof(struct lockd_res),
.pc_ressize = sizeof(struct nlm_void),
.pc_xdrressize = St,
.pc_name = "GRANTED_RES",
.pc_encode = nlmsvc_encode_shareres,
.pc_argsize = sizeof(struct lockd_args),
.pc_argzero = sizeof(struct lockd_args),
- .pc_ressize = sizeof(struct nlm_res),
+ .pc_ressize = sizeof(struct lockd_res),
.pc_xdrressize = Ck+St+1,
.pc_name = "SHARE",
},
.pc_encode = nlmsvc_encode_shareres,
.pc_argsize = sizeof(struct lockd_args),
.pc_argzero = sizeof(struct lockd_args),
- .pc_ressize = sizeof(struct nlm_res),
+ .pc_ressize = sizeof(struct lockd_res),
.pc_xdrressize = Ck+St+1,
.pc_name = "UNSHARE",
},
.pc_encode = nlmsvc_encode_res,
.pc_argsize = sizeof(struct lockd_args),
.pc_argzero = sizeof(struct lockd_args),
- .pc_ressize = sizeof(struct nlm_res),
+ .pc_ressize = sizeof(struct lockd_res),
.pc_xdrressize = Ck+St,
.pc_name = "NM_LOCK",
},
*/
union nlmsvc_xdrstore {
struct lockd_args args;
- struct nlm_res res;
+ struct lockd_res res;
struct nlm_reboot reboot;
};