audit: replace atomic_add_return()
authorYejune Deng <yejune.deng@gmail.com>
Mon, 30 Nov 2020 08:35:45 +0000 (16:35 +0800)
committerPaul Moore <paul@paul-moore.com>
Thu, 3 Dec 2020 03:52:16 +0000 (22:52 -0500)
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>
kernel/audit.c

index e22f22bdc000af62f74df05b931ac5cd05737db2..1ffc2e059027d99477053b25cdc10598c7d5385a 100644 (file)
@@ -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,