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 140bb3656a24..d38ee3c55a08 100644 --- a/fs/nfsd/nfs4callback.c +++ b/fs/nfsd/nfs4callback.c | |||
@@ -550,7 +550,7 @@ int set_callback_cred(void) | |||
550 | 550 | ||
551 | static struct workqueue_struct *callback_wq; | 551 | static struct workqueue_struct *callback_wq; |
552 | 552 | ||
553 | void do_probe_callback(struct nfs4_client *clp) | 553 | static void do_probe_callback(struct nfs4_client *clp) |
554 | { | 554 | { |
555 | struct nfsd4_callback *cb = &clp->cl_cb_null; | 555 | struct nfsd4_callback *cb = &clp->cl_cb_null; |
556 | 556 | ||
@@ -568,17 +568,22 @@ void do_probe_callback(struct nfs4_client *clp) | |||
568 | } | 568 | } |
569 | 569 | ||
570 | /* | 570 | /* |
571 | * Set up the callback client and put a NFSPROC4_CB_NULL on the wire... | 571 | * Poke the callback thread to process any updates to the callback |
572 | * parameters, and send a null probe. | ||
572 | */ | 573 | */ |
573 | void nfsd4_probe_callback(struct nfs4_client *clp, struct nfs4_cb_conn *conn) | 574 | void nfsd4_probe_callback(struct nfs4_client *clp) |
575 | { | ||
576 | set_bit(NFSD4_CLIENT_CB_UPDATE, &clp->cl_cb_flags); | ||
577 | do_probe_callback(clp); | ||
578 | } | ||
579 | |||
580 | void nfsd4_change_callback(struct nfs4_client *clp, struct nfs4_cb_conn *conn) | ||
574 | { | 581 | { |
575 | BUG_ON(atomic_read(&clp->cl_cb_set)); | 582 | BUG_ON(atomic_read(&clp->cl_cb_set)); |
576 | 583 | ||
577 | spin_lock(&clp->cl_lock); | 584 | spin_lock(&clp->cl_lock); |
578 | memcpy(&clp->cl_cb_conn, conn, sizeof(struct nfs4_cb_conn)); | 585 | memcpy(&clp->cl_cb_conn, conn, sizeof(struct nfs4_cb_conn)); |
579 | set_bit(NFSD4_CLIENT_CB_UPDATE, &clp->cl_cb_flags); | ||
580 | spin_unlock(&clp->cl_lock); | 586 | spin_unlock(&clp->cl_lock); |
581 | do_probe_callback(clp); | ||
582 | } | 587 | } |
583 | 588 | ||
584 | /* | 589 | /* |