The compiler already does this, but make it explicit. This helper
is really small and also used in update_queue's main loop, which is
O(N^2) scanning. Inline and avoid the function overhead.

Signed-off-by: Davidlohr Bueso <[email protected]>
---
 ipc/sem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ipc/sem.c b/ipc/sem.c
index d9c743ac17ff..3774b21c54d4 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -758,7 +758,7 @@ static void unlink_queue(struct sem_array *sma, struct 
sem_queue *q)
  * modified the array.
  * Note that wait-for-zero operations are handled without restart.
  */
-static int check_restart(struct sem_array *sma, struct sem_queue *q)
+static inline int check_restart(struct sem_array *sma, struct sem_queue *q)
 {
        /* pending complex alter operations are too difficult to analyse */
        if (!list_empty(&sma->pending_alter))
-- 
2.6.6

Reply via email to