Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit deda2faa authored by J. Bruce Fields's avatar J. Bruce Fields
Browse files

nfsd: uniquify cl_confirm values



Using a counter instead of the nanoseconds value seems more likely to
produce a unique cl_confirm.

Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
parent 49ba8781
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -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;
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