From: Niu Yawei Date: Fri, 31 Jul 2015 02:06:37 +0000 (-0400) Subject: LU-6929 libcfs: typo in cfs_hash_for_each_relax() X-Git-Tag: 2.7.59~65 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=dcf045eb782a0660abf092796f3c316dc72721b8;p=fs%2Flustre-release.git LU-6929 libcfs: typo in cfs_hash_for_each_relax() In cfs_hash_for_each_relax(), rc != 0 means caller want to break the iteration, so we should only continue the iteration when rc is zero. Signed-off-by: Niu Yawei Change-Id: I9666cd26ebe93627009bd03b7bbd341a65beaddf Reviewed-on: http://review.whamcloud.com/15813 Reviewed-by: Bobi Jam Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Lai Siyao Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- diff --git a/libcfs/libcfs/hash.c b/libcfs/libcfs/hash.c index 44bfaf4b..36bdf08 100644 --- a/libcfs/libcfs/hash.c +++ b/libcfs/libcfs/hash.c @@ -1653,7 +1653,7 @@ again: break; } - if (start > 0 && rc != 0) { + if (start > 0 && rc == 0) { end = start; start = 0; goto again;