Skip to content

Commit

Permalink
nfsd4: probe callback channel only once
Browse files Browse the repository at this point in the history
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: J. Bruce Fields <bfields@citi.umich.edu>
  • Loading branch information
J. Bruce Fields committed Feb 1, 2008
1 parent 24e1c13 commit 46f8a64
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions fs/nfsd/nfs4callback.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,7 @@ nfsd4_probe_callback(struct nfs4_client *clp)
};
struct task_struct *t;

if (atomic_read(&cb->cb_set))
return;
BUG_ON(atomic_read(&clp->cl_callback.cb_set));

/* Initialize address */
memset(&addr, 0, sizeof(addr));
Expand Down
3 changes: 1 addition & 2 deletions fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -948,6 +948,7 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp,
}
move_to_confirmed(unconf);
conf = unconf;
nfsd4_probe_callback(conf);
status = nfs_ok;
}
} else if ((!conf || (conf && !same_verf(&conf->cl_confirm, &confirm)))
Expand All @@ -965,8 +966,6 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp,
status = nfserr_clid_inuse;
}
out:
if (!status)
nfsd4_probe_callback(conf);
nfs4_unlock_state();
return status;
}
Expand Down

0 comments on commit 46f8a64

Please sign in to comment.