diff options
author | J. Bruce Fields <bfields@redhat.com> | 2010-10-19 17:56:52 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2010-10-21 10:11:55 -0400 |
commit | 5a3c9d71343cf27b7afef24ed312368d48dada09 (patch) | |
tree | f547acfdd49706cfa484dce5dc16339617e6346b /fs/nfsd/nfs4callback.c | |
parent | 8b5ce5cd44743af84507721fa2cb4125ae67955c (diff) |
nfsd4: separate callback change and callback probe
Only one of the nfsd4_callback_probe callers actually cares about
changing the callback information.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4callback.c')
-rw-r--r-- | fs/nfsd/nfs4callback.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c index 140bb3656a2..d38ee3c55a0 100644 --- a/fs/nfsd/nfs4callback.c +++ b/fs/nfsd/nfs4callback.c @@ -550,7 +550,7 @@ int set_callback_cred(void) static struct workqueue_struct *callback_wq; -void do_probe_callback(struct nfs4_client *clp) +static void do_probe_callback(struct nfs4_client *clp) { struct nfsd4_callback *cb = &clp->cl_cb_null; @@ -568,17 +568,22 @@ void do_probe_callback(struct nfs4_client *clp) } /* - * Set up the callback client and put a NFSPROC4_CB_NULL on the wire... + * Poke the callback thread to process any updates to the callback + * parameters, and send a null probe. */ -void nfsd4_probe_callback(struct nfs4_client *clp, struct nfs4_cb_conn *conn) +void nfsd4_probe_callback(struct nfs4_client *clp) +{ + set_bit(NFSD4_CLIENT_CB_UPDATE, &clp->cl_cb_flags); + do_probe_callback(clp); +} + +void nfsd4_change_callback(struct nfs4_client *clp, struct nfs4_cb_conn *conn) { BUG_ON(atomic_read(&clp->cl_cb_set)); spin_lock(&clp->cl_lock); memcpy(&clp->cl_cb_conn, conn, sizeof(struct nfs4_cb_conn)); - set_bit(NFSD4_CLIENT_CB_UPDATE, &clp->cl_cb_flags); spin_unlock(&clp->cl_lock); - do_probe_callback(clp); } /* |