fs/lockd/svc4proc.c | 21 +++++++++++++++++++-- fs/lockd/svcproc.c | 19 +++++++++++++++++-- include/linux/lockd/lockd.h | 1 + 3 files changed, 37 insertions(+), 4 deletions(-) diff -u --recursive --new-file --show-c-function linux-2.6.3-10-misc/fs/lockd/svc4proc.c linux-2.6.3-11-lockd1/fs/lockd/svc4proc.c --- linux-2.6.3-10-misc/fs/lockd/svc4proc.c 2004-02-19 11:55:35.000000000 -0800 +++ linux-2.6.3-11-lockd1/fs/lockd/svc4proc.c 2004-02-19 21:23:56.000000000 -0800 @@ -453,6 +453,24 @@ nlm4svc_proc_sm_notify(struct svc_rqst * } /* + * client sent a GRANTED_RES, let's remove the associated block + */ +static int +nlm4svc_proc_granted_res(struct svc_rqst *rqstp, struct nlm_res *argp, + void *resp) +{ + if (!nlmsvc_ops) + return rpc_success; + + dprintk("lockd: GRANTED_RES called\n"); + + nlmsvc_grant_reply(&argp->cookie, argp->status); + return rpc_success; +} + + + +/* * This is the generic lockd callback for async RPC calls */ static u32 @@ -515,7 +533,6 @@ nlm4svc_callback_exit(struct rpc_task *t #define nlm4svc_proc_lock_res nlm4svc_proc_null #define nlm4svc_proc_cancel_res nlm4svc_proc_null #define nlm4svc_proc_unlock_res nlm4svc_proc_null -#define nlm4svc_proc_granted_res nlm4svc_proc_null struct nlm_void { int dummy; }; @@ -548,7 +565,7 @@ struct svc_procedure nlmsvc_procedures4 PROC(lock_res, lockres, norep, res, void, 1), PROC(cancel_res, cancelres, norep, res, void, 1), PROC(unlock_res, unlockres, norep, res, void, 1), - PROC(granted_res, grantedres, norep, res, void, 1), + PROC(granted_res, res, norep, res, void, 1), /* statd callback */ PROC(sm_notify, reboot, void, reboot, void, 1), PROC(none, void, void, void, void, 0), diff -u --recursive --new-file --show-c-function linux-2.6.3-10-misc/fs/lockd/svcproc.c linux-2.6.3-11-lockd1/fs/lockd/svcproc.c --- linux-2.6.3-10-misc/fs/lockd/svcproc.c 2004-02-19 12:01:41.000000000 -0800 +++ linux-2.6.3-11-lockd1/fs/lockd/svcproc.c 2004-02-19 21:23:56.000000000 -0800 @@ -479,6 +479,22 @@ nlmsvc_proc_sm_notify(struct svc_rqst *r } /* + * client sent a GRANTED_RES, let's remove the associated block + */ +static int +nlmsvc_proc_granted_res(struct svc_rqst *rqstp, struct nlm_res *argp, + void *resp) +{ + if (!nlmsvc_ops) + return rpc_success; + + dprintk("lockd: GRANTED_RES called\n"); + + nlmsvc_grant_reply(&argp->cookie, argp->status); + return rpc_success; +} + +/* * This is the generic lockd callback for async RPC calls */ static u32 @@ -541,7 +557,6 @@ nlmsvc_callback_exit(struct rpc_task *ta #define nlmsvc_proc_lock_res nlmsvc_proc_null #define nlmsvc_proc_cancel_res nlmsvc_proc_null #define nlmsvc_proc_unlock_res nlmsvc_proc_null -#define nlmsvc_proc_granted_res nlmsvc_proc_null struct nlm_void { int dummy; }; @@ -576,7 +591,7 @@ struct svc_procedure nlmsvc_procedures[ PROC(lock_res, lockres, norep, res, void, 1), PROC(cancel_res, cancelres, norep, res, void, 1), PROC(unlock_res, unlockres, norep, res, void, 1), - PROC(granted_res, grantedres, norep, res, void, 1), + PROC(granted_res, res, norep, res, void, 1), /* statd callback */ PROC(sm_notify, reboot, void, reboot, void, 1), PROC(none, void, void, void, void, 1), diff -u --recursive --new-file --show-c-function linux-2.6.3-10-misc/include/linux/lockd/lockd.h linux-2.6.3-11-lockd1/include/linux/lockd/lockd.h --- linux-2.6.3-10-misc/include/linux/lockd/lockd.h 2004-02-19 11:51:19.000000000 -0800 +++ linux-2.6.3-11-lockd1/include/linux/lockd/lockd.h 2004-02-19 21:23:56.000000000 -0800 @@ -165,6 +165,7 @@ u32 nlmsvc_cancel_blocked(struct nlm_ unsigned long nlmsvc_retry_blocked(void); int nlmsvc_traverse_blocks(struct nlm_host *, struct nlm_file *, int action); +void nlmsvc_grant_reply(struct nlm_cookie *cookie, u32 status); /* * File handling for the server personality