diff options
author | J. Bruce Fields <bfields@redhat.com> | 2010-12-10 17:37:44 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2011-01-11 15:04:11 -0500 |
commit | 229b2a0839870d0d4f91ad3b24ec13c57bbd50a0 (patch) | |
tree | 76798fb234c46aee1db85d69a37e034d107d16e0 /fs/nfsd | |
parent | 84f5f7ccc59e628fc8754c0a837fd7e9559711ac (diff) |
nfsd4: add helper function to run callbacks
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd')
-rw-r--r-- | fs/nfsd/nfs4callback.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c index cb002dce5630..fff96dc7704e 100644 --- a/fs/nfsd/nfs4callback.c +++ b/fs/nfsd/nfs4callback.c | |||
@@ -560,6 +560,11 @@ int set_callback_cred(void) | |||
560 | 560 | ||
561 | static struct workqueue_struct *callback_wq; | 561 | static struct workqueue_struct *callback_wq; |
562 | 562 | ||
563 | static void run_nfsd4_cb(struct nfsd4_callback *cb) | ||
564 | { | ||
565 | queue_work(callback_wq, &cb->cb_work); | ||
566 | } | ||
567 | |||
563 | static void do_probe_callback(struct nfs4_client *clp) | 568 | static void do_probe_callback(struct nfs4_client *clp) |
564 | { | 569 | { |
565 | struct nfsd4_callback *cb = &clp->cl_cb_null; | 570 | struct nfsd4_callback *cb = &clp->cl_cb_null; |
@@ -574,7 +579,7 @@ static void do_probe_callback(struct nfs4_client *clp) | |||
574 | 579 | ||
575 | cb->cb_ops = &nfsd4_cb_probe_ops; | 580 | cb->cb_ops = &nfsd4_cb_probe_ops; |
576 | 581 | ||
577 | queue_work(callback_wq, &cb->cb_work); | 582 | run_nfsd4_cb(cb); |
578 | } | 583 | } |
579 | 584 | ||
580 | /* | 585 | /* |
@@ -859,5 +864,5 @@ void nfsd4_cb_recall(struct nfs4_delegation *dp) | |||
859 | cb->cb_ops = &nfsd4_cb_recall_ops; | 864 | cb->cb_ops = &nfsd4_cb_recall_ops; |
860 | dp->dl_retries = 1; | 865 | dp->dl_retries = 1; |
861 | 866 | ||
862 | queue_work(callback_wq, &dp->dl_recall.cb_work); | 867 | run_nfsd4_cb(&dp->dl_recall); |
863 | } | 868 | } |