On Dec. 16, 2009, 22:58 +0200, " J. Bruce Fields" <bfields@xxxxxxxxxxxxxx> wrote: > On Wed, Dec 16, 2009 at 07:41:25PM +0200, Benny Halevy wrote: >> Signed-off-by: Benny Halevy <bhalevy@xxxxxxxxxxx> >> --- >> fs/nfsd/nfs4state.c | 3 +++ >> 1 files changed, 3 insertions(+), 0 deletions(-) >> >> diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c >> index 16ccab3..15f4b63 100644 >> --- a/fs/nfsd/nfs4state.c >> +++ b/fs/nfsd/nfs4state.c >> @@ -2613,6 +2613,9 @@ nfs4_laundromat(void) >> clientid_val = t; >> break; >> } >> + /* skip clients marked for renewal */ >> + if (atomic_read(&clp->cl_state) == CL_STATE_RENEW) >> + continue; > > I may just not understand your locking scheme. > > But how are concurrent expiriry and renewal handled? Couldn't the state > be marked CL_STATE_RENEW after this check but before CL_STATE_EXPIRED is > set in the following expire_client()? What happens then? You're right. This should be a cmpxchg form CL_STATE_NORMAL to CL_STATE_EXPIRED, and then looking at the old val. Benny > > --b. > >> dprintk("NFSD: purging unused client (clientid %08x)\n", >> clp->cl_clientid.cl_id); >> nfsd4_remove_clid_dir(clp); >> -- >> 1.6.5.1 >> -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html