nfsd4: add helper function to run callbacks
authorJ. Bruce Fields <bfields@redhat.com>
Fri, 10 Dec 2010 22:37:44 +0000 (17:37 -0500)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 11 Jan 2011 20:04:11 +0000 (15:04 -0500)
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4callback.c

index cb002dce56308d918c879888b2178684640e5c90..fff96dc7704ef7121e58bb3d02ae2ef4e4bde395 100644 (file)
@@ -560,6 +560,11 @@ int set_callback_cred(void)
 
 static struct workqueue_struct *callback_wq;
 
+static void run_nfsd4_cb(struct nfsd4_callback *cb)
+{
+       queue_work(callback_wq, &cb->cb_work);
+}
+
 static void do_probe_callback(struct nfs4_client *clp)
 {
        struct nfsd4_callback *cb = &clp->cl_cb_null;
@@ -574,7 +579,7 @@ static void do_probe_callback(struct nfs4_client *clp)
 
        cb->cb_ops = &nfsd4_cb_probe_ops;
 
-       queue_work(callback_wq, &cb->cb_work);
+       run_nfsd4_cb(cb);
 }
 
 /*
@@ -859,5 +864,5 @@ void nfsd4_cb_recall(struct nfs4_delegation *dp)
        cb->cb_ops = &nfsd4_cb_recall_ops;
        dp->dl_retries = 1;
 
-       queue_work(callback_wq, &dp->dl_recall.cb_work);
+       run_nfsd4_cb(&dp->dl_recall);
 }