[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1606725345-7442-1-git-send-email-yejune.deng@gmail.com>
Date: Mon, 30 Nov 2020 16:35:45 +0800
From: Yejune Deng <yejune.deng@...il.com>
To: paul@...l-moore.com, eparis@...hat.com
Cc: linux-audit@...hat.com, linux-kernel@...r.kernel.org,
yejune.deng@...il.com
Subject: [PATCH] audit: replace atomic_add_return()
atomic_inc_return() is a little neater
Signed-off-by: Yejune Deng <yejune.deng@...il.com>
---
kernel/audit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/audit.c b/kernel/audit.c
index e22f22b..1ffc2e0 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -1779,7 +1779,7 @@ unsigned int audit_serial(void)
{
static atomic_t serial = ATOMIC_INIT(0);
- return atomic_add_return(1, &serial);
+ return atomic_inc_return(&serial);
}
static inline void audit_get_stamp(struct audit_context *ctx,
--
1.9.1
Powered by blists - more mailing lists