aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/state.h
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@citi.umich.edu>2010-03-03 14:52:55 -0500
committerJ. Bruce Fields <bfields@citi.umich.edu>2010-04-22 11:34:01 -0400
commitb5a1a81e5c25fb6bb3fdc1812ba69ff6ab638fcf (patch)
treec524a75d111f4060eb985161478362ac18c17169 /fs/nfsd/state.h
parent3c4ab2aaa90826060b1e8d4036f9bb8325f8759e (diff)
nfsd4: don't sleep in lease-break callback
The NFSv4 server's fl_break callback can sleep (dropping the BKL), in order to allocate a new rpc task to send a recall to the client. As far as I can tell this doesn't cause any races in the current code, but the analysis is difficult. Also, the sleep here may complicate the move away from the BKL. So, just schedule some work to do the job for us instead. The work will later also prove useful for restarting a call after the callback information is changed. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'fs/nfsd/state.h')
-rw-r--r--fs/nfsd/state.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/nfsd/state.h b/fs/nfsd/state.h
index b85437982a8..c4c92aea8f3 100644
--- a/fs/nfsd/state.h
+++ b/fs/nfsd/state.h
@@ -77,6 +77,7 @@ struct nfs4_rpc_args {
77 77
78struct nfsd4_callback { 78struct nfsd4_callback {
79 struct nfs4_rpc_args cb_args; 79 struct nfs4_rpc_args cb_args;
80 struct work_struct cb_work;
80}; 81};
81 82
82struct nfs4_delegation { 83struct nfs4_delegation {
@@ -391,7 +392,11 @@ extern void put_nfs4_client(struct nfs4_client *clp);
391extern void nfs4_free_stateowner(struct kref *kref); 392extern void nfs4_free_stateowner(struct kref *kref);
392extern int set_callback_cred(void); 393extern int set_callback_cred(void);
393extern void nfsd4_probe_callback(struct nfs4_client *clp); 394extern void nfsd4_probe_callback(struct nfs4_client *clp);
395extern void nfsd4_do_callback_rpc(struct work_struct *);
394extern void nfsd4_cb_recall(struct nfs4_delegation *dp); 396extern void nfsd4_cb_recall(struct nfs4_delegation *dp);
397extern int nfsd4_create_callback_queue(void);
398extern void nfsd4_destroy_callback_queue(void);
399extern void nfsd4_set_callback_client(struct nfs4_client *, struct rpc_clnt *);
395extern void nfs4_put_delegation(struct nfs4_delegation *dp); 400extern void nfs4_put_delegation(struct nfs4_delegation *dp);
396extern __be32 nfs4_make_rec_clidname(char *clidname, struct xdr_netobj *clname); 401extern __be32 nfs4_make_rec_clidname(char *clidname, struct xdr_netobj *clname);
397extern void nfsd4_init_recdir(char *recdir_name); 402extern void nfsd4_init_recdir(char *recdir_name);