From acdc2c8bb7aaf8d193619291b996c5b290c68213 Mon Sep 17 00:00:00 2001 From: Arshad Hussain Date: Thu, 1 Jun 2023 13:03:01 +0530 Subject: [PATCH] LU-16796 libcfs: Remove reference to LASSERT_ATOMIC_GT This patch removes all reference to LASSERT_ATOMIC_GT macro. Signed-off-by: Arshad Hussain Change-Id: I7978ceb495c3e03153843439109d48d47bba1e2a Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51189 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin Reviewed-by: Andreas Dilger Reviewed-by: James Simmons --- libcfs/include/libcfs/libcfs_private.h | 5 ----- lustre/ptlrpc/sec_null.c | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/libcfs/include/libcfs/libcfs_private.h b/libcfs/include/libcfs/libcfs_private.h index a3382ef..c4c90ed 100644 --- a/libcfs/include/libcfs/libcfs_private.h +++ b/libcfs/include/libcfs/libcfs_private.h @@ -254,10 +254,6 @@ int libcfs_debug_mark_buffer(const char *text); #define LASSERT_ATOMIC_EQ(a, v) \ LASSERTF(atomic_read(a) == v, "value: %d\n", atomic_read((a))); -/** assert value of @a is great than @v */ -#define LASSERT_ATOMIC_GT(a, v) \ - LASSERTF(atomic_read(a) > v, "value: %d\n", atomic_read((a))); - /** assert value of @a is great than @v1 and little than @v2 */ #define LASSERT_ATOMIC_GT_LT(a, v1, v2) \ do { \ @@ -268,7 +264,6 @@ do { \ #else /* !LASSERT_ATOMIC_ENABLED */ #define LASSERT_ATOMIC_EQ(a, v) do {} while (0) -#define LASSERT_ATOMIC_GT(a, v) do {} while (0) #define LASSERT_ATOMIC_GT_LT(a, v1, v2) do {} while (0) #endif /* LASSERT_ATOMIC_ENABLED */ diff --git a/lustre/ptlrpc/sec_null.c b/lustre/ptlrpc/sec_null.c index 4fb3a09..f56c356 100644 --- a/lustre/ptlrpc/sec_null.c +++ b/lustre/ptlrpc/sec_null.c @@ -332,7 +332,7 @@ int null_alloc_rs(struct ptlrpc_request *req, int msgsize) static void null_free_rs(struct ptlrpc_reply_state *rs) { - LASSERT_ATOMIC_GT(&rs->rs_svc_ctx->sc_refcount, 1); + LASSERT(atomic_read(&rs->rs_svc_ctx->sc_refcount) > 1); atomic_dec(&rs->rs_svc_ctx->sc_refcount); if (!rs->rs_prealloc) -- 1.8.3.1