Skip to contentSkip to conversation

ipc: Using unlikely macro is more efficient.

PATCH New mohammed0x00 1 participant 1 message Sep 17, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ipc: Using unlikely macro is more efficient.

---
 ipc/shm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ipc/shm.c +1 -1
index 576a543b7..8ce67ae16 100644
@@ -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;
 	}
Signature · 1 line
2.34.1