From 1271ea42d82dbf8bc72e8fc47a08cecc44f978ae Mon Sep 17 00:00:00 2001 From: "John L. Hammond" Date: Mon, 29 Apr 2013 09:33:54 -0500 Subject: [PATCH] LU-3242 obdclass: skip zero cookie in class_handle_hash() In class_handle_hash() really skip the zero cookie when it comes around. Signed-off-by: John L. Hammond Change-Id: I042d7a43b70feb9710a7b3a27e732fc314ec1cf5 Reviewed-on: http://review.whamcloud.com/6198 Tested-by: Hudson Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/obdclass/lustre_handles.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/obdclass/lustre_handles.c b/lustre/obdclass/lustre_handles.c index 4d13acc..44ebea0 100644 --- a/lustre/obdclass/lustre_handles.c +++ b/lustre/obdclass/lustre_handles.c @@ -89,7 +89,6 @@ void class_handle_hash(struct portals_handle *h, spin_lock(&handle_base_lock); handle_base += HANDLE_INCR; - h->h_cookie = handle_base; if (unlikely(handle_base == 0)) { /* * Cookie of zero is "dangerous", because in many places it's @@ -99,6 +98,7 @@ void class_handle_hash(struct portals_handle *h, CWARN("The universe has been exhausted: cookie wrap-around.\n"); handle_base += HANDLE_INCR; } + h->h_cookie = handle_base; spin_unlock(&handle_base_lock); h->h_ops = ops; -- 1.8.3.1