Commit 46f8a64b authored by J. Bruce Fields's avatar J. Bruce Fields

nfsd4: probe callback channel only once

Our callback code doesn't actually handle concurrent attempts to probe
the callback channel.  Some rethinking of the locking may be required.
However, we can also just move the callback probing to this case.  Since
this is the only time a client is "confirmed" (and since that can only
happen once in the lifetime of a client), this ensures we only probe
once.
Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
parent 24e1c13c
...@@ -395,8 +395,7 @@ nfsd4_probe_callback(struct nfs4_client *clp) ...@@ -395,8 +395,7 @@ nfsd4_probe_callback(struct nfs4_client *clp)
}; };
struct task_struct *t; struct task_struct *t;
if (atomic_read(&cb->cb_set)) BUG_ON(atomic_read(&clp->cl_callback.cb_set));
return;
/* Initialize address */ /* Initialize address */
memset(&addr, 0, sizeof(addr)); memset(&addr, 0, sizeof(addr));
......
...@@ -948,6 +948,7 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp, ...@@ -948,6 +948,7 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp,
} }
move_to_confirmed(unconf); move_to_confirmed(unconf);
conf = unconf; conf = unconf;
nfsd4_probe_callback(conf);
status = nfs_ok; status = nfs_ok;
} }
} else if ((!conf || (conf && !same_verf(&conf->cl_confirm, &confirm))) } else if ((!conf || (conf && !same_verf(&conf->cl_confirm, &confirm)))
...@@ -965,8 +966,6 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp, ...@@ -965,8 +966,6 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp,
status = nfserr_clid_inuse; status = nfserr_clid_inuse;
} }
out: out:
if (!status)
nfsd4_probe_callback(conf);
nfs4_unlock_state(); nfs4_unlock_state();
return status; return status;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment