[lustre-devel] [PATCH 06/27] lnet: libcfs: Remove reference to LASSERT_ATOMIC_GT
James Simmons
jsimmons at infradead.org
Fri Mar 21 06:06:49 PDT 2025
From: Arshad Hussain <arshad.hussain at aeoncomputing.com>
This patch removes all reference to LASSERT_ATOMIC_GT macro.
WC-bug-id: https://jira.whamcloud.com/browse/LU-16796
Lustre-commit: acdc2c8bb7aaf8d19 ("LU-16796 libcfs: Remove reference to LASSERT_ATOMIC_GT")
Signed-off-by: Arshad Hussain <arshad.hussain at aeoncomputing.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51189
Reviewed-by: Oleg Drokin <green at whamcloud.com>
Reviewed-by: Andreas Dilger <adilger at whamcloud.com>
Reviewed-by: James Simmons <jsimmons at infradead.org>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
fs/lustre/ptlrpc/sec_null.c | 2 +-
include/linux/libcfs/libcfs_private.h | 5 -----
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/fs/lustre/ptlrpc/sec_null.c b/fs/lustre/ptlrpc/sec_null.c
index a7241bde7525..9f3a4ef43818 100644
--- a/fs/lustre/ptlrpc/sec_null.c
+++ b/fs/lustre/ptlrpc/sec_null.c
@@ -343,7 +343,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) {
diff --git a/include/linux/libcfs/libcfs_private.h b/include/linux/libcfs/libcfs_private.h
index cc9115a89f43..d46c66e8534b 100644
--- a/include/linux/libcfs/libcfs_private.h
+++ b/include/linux/libcfs/libcfs_private.h
@@ -112,10 +112,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 { \
@@ -126,7 +122,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 */
--
2.39.3
More information about the lustre-devel
mailing list