summaryrefslogtreecommitdiff
path: root/kernel/audit.c
diff options
context:
space:
mode:
authorYejune Deng <yejune.deng@gmail.com>2020-11-30 16:35:45 +0800
committerPaul Moore <paul@paul-moore.com>2020-12-02 22:52:16 -0500
commit6b3211842a115d697fbf78d09f3e83852200e413 (patch)
tree08be45bb898a0c4cd8316dbd7c9089956af0a34b /kernel/audit.c
parentba59eae723857257a791618092d8022ad82efaa4 (diff)
downloadlwn-6b3211842a115d697fbf78d09f3e83852200e413.tar.gz
lwn-6b3211842a115d697fbf78d09f3e83852200e413.zip
audit: replace atomic_add_return()
atomic_inc_return() is a little neater Signed-off-by: Yejune Deng <yejune.deng@gmail.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'kernel/audit.c')
-rw-r--r--kernel/audit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/audit.c b/kernel/audit.c
index e22f22bdc000..1ffc2e059027 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,