Skip to content

Commit 4663d3e

Browse files
Davidlohr Buesotorvalds
authored andcommitted
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/1474225896-10066-5-git-send-email-dave@stgolabs.net Signed-off-by: Davidlohr Bueso <dbueso@suse.de> Cc: Manfred Spraul <manfred@colorfullife.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 4ce33ec commit 4663d3e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎ipc/sem.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ static void unlink_queue(struct sem_array *sma, struct sem_queue *q)
772772
* modified the array.
773773
* Note that wait-for-zero operations are handled without restart.
774774
*/
775-
static int check_restart(struct sem_array *sma, struct sem_queue *q)
775+
static inline int check_restart(struct sem_array *sma, struct sem_queue *q)
776776
{
777777
/* pending complex alter operations are too difficult to analyse */
778778
if (!list_empty(&sma->pending_alter))

0 commit comments

Comments
 (0)