lkml.org 
[lkml]   [2023]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] ipc: Using unlikely macro is more efficient.
Date
Signed-off-by: Mohammed Mansour <mmansour.mm5@gmail.com>
---
ipc/shm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ipc/shm.c b/ipc/shm.c
index 576a543b7..8ce67ae16 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -734,7 +734,7 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params)

shp->shm_perm.security = NULL;
error = security_shm_alloc(&shp->shm_perm);
- if (error) {
+ if (unlikely(error)) {
kfree(shp);
return error;
}
--
2.34.1
\
 
 \ /
  Last update: 2023-09-17 19:15    [W:0.028 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site