Skip to content

Commit

Permalink
nfsd: uniquify cl_confirm values
Browse files Browse the repository at this point in the history
Using a counter instead of the nanoseconds value seems more likely to
produce a unique cl_confirm.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
  • Loading branch information
J. Bruce Fields committed Feb 1, 2008
1 parent 49ba878 commit deda2fa
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -491,15 +491,14 @@ gen_clid(struct nfs4_client *clp) {
clp->cl_clientid.cl_id = current_clientid++;
}

static void
gen_confirm(struct nfs4_client *clp) {
struct timespec tv;
u32 * p;
static void gen_confirm(struct nfs4_client *clp)
{
static u32 i;
u32 *p;

tv = CURRENT_TIME;
p = (u32 *)clp->cl_confirm.data;
*p++ = tv.tv_sec;
*p++ = tv.tv_nsec;
*p++ = get_seconds();
*p++ = i++;
}

static int
Expand Down

0 comments on commit deda2fa

Please sign in to comment.