From 326129d02aea8efa1dfd1a210653a744e7c85239 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Wed, 24 Sep 2014 12:19:17 +0200 Subject: nfsd: introduce a generic nfsd4_cb Add a helper to queue up a callback. CB_NULL has a bit of special casing because it is special in the specification, but all other new callback operations will be able to share code with this and a few more changes to refactor the callback code. Signed-off-by: Christoph Hellwig Reviewed-by: Jeff Layton Signed-off-by: J. Bruce Fields --- fs/nfsd/state.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'fs/nfsd/state.h') diff --git a/fs/nfsd/state.h b/fs/nfsd/state.h index 57d2db63a1ed..5fb6ab17f386 100644 --- a/fs/nfsd/state.h +++ b/fs/nfsd/state.h @@ -517,6 +517,13 @@ static inline struct nfs4_ol_stateid *openlockstateid(struct nfs4_stid *s) #define RD_STATE 0x00000010 #define WR_STATE 0x00000020 +enum nfsd4_cb_op { + NFSPROC4_CLNT_CB_NULL = 0, + NFSPROC4_CLNT_CB_RECALL, + NFSPROC4_CLNT_CB_SEQUENCE, +}; + + struct nfsd4_compound_state; struct nfsd_net; @@ -536,7 +543,8 @@ void nfsd4_run_cb_recall(struct work_struct *w); extern void nfsd4_probe_callback(struct nfs4_client *clp); extern void nfsd4_probe_callback_sync(struct nfs4_client *clp); extern void nfsd4_change_callback(struct nfs4_client *clp, struct nfs4_cb_conn *); -extern void nfsd4_cb_recall(struct nfs4_delegation *dp); +extern void nfsd4_cb(struct nfsd4_callback *cb, struct nfs4_client *clp, + enum nfsd4_cb_op op); extern int nfsd4_create_callback_queue(void); extern void nfsd4_destroy_callback_queue(void); extern void nfsd4_shutdown_callback(struct nfs4_client *); -- cgit v1.2.3