diff options
| author | Davidlohr Bueso <[email protected]> | 2016-12-14 15:06:40 -0800 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2016-12-14 16:04:08 -0800 |
| commit | 4663d3e8f21652f33c698fcc2bf20f61499d9c3e (patch) | |
| tree | 683dd94878d05e85e464627ddd4aa08db0b0bcdc | |
| parent | 4ce33ec2e42d4661bf05289e213bc088eecb9132 (diff) | |
ipc/sem: explicitly inline check_restart
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.
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Davidlohr Bueso <[email protected]>
Cc: Manfred Spraul <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
| -rw-r--r-- | ipc/sem.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ipc/sem.c b/ipc/sem.c index c14883f5a4b5..084e1f55ca72 100644 --- a/ipc/sem.c +++ b/ipc/sem.c @@ -772,7 +772,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)) |