Whamcloud - gitweb
LU-6929 libcfs: typo in cfs_hash_for_each_relax() 13/15813/3
authorNiu Yawei <yawei.niu@intel.com>
Fri, 31 Jul 2015 02:06:37 +0000 (22:06 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 18 Aug 2015 11:11:19 +0000 (11:11 +0000)
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 <yawei.niu@intel.com>
Change-Id: I9666cd26ebe93627009bd03b7bbd341a65beaddf
Reviewed-on: http://review.whamcloud.com/15813
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
libcfs/libcfs/hash.c

index 44bfaf4..36bdf08 100644 (file)
@@ -1653,7 +1653,7 @@ again:
                        break;
         }
 
-       if (start > 0 && rc != 0) {
+       if (start > 0 && rc == 0) {
                end = start;
                start = 0;
                goto again;