From dcf045eb782a0660abf092796f3c316dc72721b8 Mon Sep 17 00:00:00 2001 From: Niu Yawei Date: Thu, 30 Jul 2015 22:06:37 -0400 Subject: [PATCH] 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 --- libcfs/libcfs/hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 1.8.3.1