From f2f8b6deaf54f1a264b31b44f6cf875fa1629ab2 Mon Sep 17 00:00:00 2001 From: Alex Zhuravlev Date: Tue, 17 Oct 2023 14:48:58 +0300 Subject: [PATCH] LU-17203 libcfs: ignore remaining items remove the assertion checking libcfs hashtable for emptiness in cfs_hash_for_each_empty(). the only user of this hashtable is per-export ldlm locks set. in this case it's legal that some locks can't be removed from the hashtable being in the process of enqueuing. the hashtable is destroyed from the export destroy function which in turn is called only when all RPCs on this export are done (exp_rpc_count==0). Fixes: 306a9b666e ("LU-16272 libcfs: cfs_hash_for_each_empty optimization") Signed-off-by: Alex Zhuravlev Change-Id: I2b853b017bb7247a0c60cc8f464c2e08d649f0eb Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52726 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Arshad Hussain Reviewed-by: Oleg Drokin Reviewed-by: Andreas Dilger --- libcfs/libcfs/hash.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libcfs/libcfs/hash.c b/libcfs/libcfs/hash.c index cd0bc77..f191e53 100644 --- a/libcfs/libcfs/hash.c +++ b/libcfs/libcfs/hash.c @@ -1748,7 +1748,6 @@ cfs_hash_for_each_empty(struct cfs_hash *hs, hs->hs_name, i++); } cfs_hash_for_each_exit(hs); - LASSERT(atomic_read(&hs->hs_count) == 0); RETURN(0); } EXPORT_SYMBOL(cfs_hash_for_each_empty); -- 1.8.3.1