From: John L. Hammond Date: Mon, 29 Apr 2013 14:33:54 +0000 (-0500) Subject: LU-3242 obdclass: skip zero cookie in class_handle_hash() X-Git-Tag: 2.3.65~39 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=1271ea42d82dbf8bc72e8fc47a08cecc44f978ae 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 --- 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;