diff options
author | J. Bruce Fields <bfields@citi.umich.edu> | 2007-11-19 20:31:04 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2008-02-01 16:42:05 -0500 |
commit | deda2faa8e71474c828d8eefc8bc0f19d02062ef (patch) | |
tree | 72344206dd12a189e466cde3b479d6dc5ae09843 /fs/nfsd | |
parent | 49ba87811f34a0219dc7a373cd24aa68450f2058 (diff) |
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: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'fs/nfsd')
-rw-r--r-- | fs/nfsd/nfs4state.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 035e70a01027..9f6322e830fa 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -491,15 +491,14 @@ gen_clid(struct nfs4_client *clp) { | |||
491 | clp->cl_clientid.cl_id = current_clientid++; | 491 | clp->cl_clientid.cl_id = current_clientid++; |
492 | } | 492 | } |
493 | 493 | ||
494 | static void | 494 | static void gen_confirm(struct nfs4_client *clp) |
495 | gen_confirm(struct nfs4_client *clp) { | 495 | { |
496 | struct timespec tv; | 496 | static u32 i; |
497 | u32 * p; | 497 | u32 *p; |
498 | 498 | ||
499 | tv = CURRENT_TIME; | ||
500 | p = (u32 *)clp->cl_confirm.data; | 499 | p = (u32 *)clp->cl_confirm.data; |
501 | *p++ = tv.tv_sec; | 500 | *p++ = get_seconds(); |
502 | *p++ = tv.tv_nsec; | 501 | *p++ = i++; |
503 | } | 502 | } |
504 | 503 | ||
505 | static int | 504 | static int |