This patch removes all reference to LASSERT_ATOMIC_ZERO macro.
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: I73259599d1dee6277fadf66181699f1282274a80
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51004
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
int libcfs_debug_clear_buffer(void);
int libcfs_debug_mark_buffer(const char *text);
-#define LASSERT_ATOMIC_ENABLED (1)
-
-#if LASSERT_ATOMIC_ENABLED
-
-/** assert value of @a is equal to @v */
-#define LASSERT_ATOMIC_EQ(a, v) \
- LASSERTF(atomic_read(a) == v, "value: %d\n", atomic_read((a)));
-
-#else /* !LASSERT_ATOMIC_ENABLED */
-
-#define LASSERT_ATOMIC_EQ(a, v) do {} while (0)
-
-#endif /* LASSERT_ATOMIC_ENABLED */
-
-#define LASSERT_ATOMIC_ZERO(a) LASSERT_ATOMIC_EQ(a, 0)
-
#define CFS_ALLOC_PTR(ptr) LIBCFS_ALLOC(ptr, sizeof(*(ptr)));
#define CFS_ALLOC_PTR_ARRAY(ptr, count) \
LIBCFS_ALLOC(ptr, (count) * sizeof(*(ptr)))
if (imp != NULL)
client_destroy_import(imp);
- LASSERT_ATOMIC_ZERO(&exp->exp_locks_count);
- LASSERT_ATOMIC_ZERO(&exp->exp_rpc_count);
- LASSERT_ATOMIC_ZERO(&exp->exp_cb_count);
- LASSERT_ATOMIC_ZERO(&exp->exp_replay_count);
+ LASSERT(atomic_read(&exp->exp_locks_count) == 0);
+ LASSERT(atomic_read(&exp->exp_rpc_count) == 0);
+ LASSERT(atomic_read(&exp->exp_cb_count) == 0);
+ LASSERT(atomic_read(&exp->exp_replay_count) == 0);
}
EXPORT_SYMBOL(target_destroy_export);
{
struct ptlrpc_sec_policy *policy = sec->ps_policy;
- LASSERT_ATOMIC_ZERO(&sec->ps_refcount);
- LASSERT_ATOMIC_ZERO(&sec->ps_nctx);
+ LASSERT(atomic_read(&sec->ps_refcount) == 0);
+ LASSERT(atomic_read(&sec->ps_nctx) == 0);
LASSERT(policy->sp_cops->destroy_sec);
CDEBUG(D_SEC, "%s@%p: being destroyed\n", sec->ps_policy->sp_name, sec);