ipc,msg: introduce msgctl_nolock
authorDavidlohr Bueso <davidlohr.bueso@hp.com>
Mon, 8 Jul 2013 23:01:14 +0000 (16:01 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Oct 2013 14:45:46 +0000 (07:45 -0700)
commitf1f7913980afb02f8dee9ee190b29230e69cf7a4
tree24fda196233a161cec8d351ce65b73ae99e839e4
parentf880aca02ec5531b5ce62b10dae6311001a34804
ipc,msg: introduce msgctl_nolock

commit 2cafed30f150f7314f98717b372df8173516cae0 upstream.

Similar to semctl, when calling msgctl, the *_INFO and *_STAT commands
can be performed without acquiring the ipc object.

Add a msgctl_nolock() function and move the logic of *_INFO and *_STAT
out of msgctl().  This change still takes the lock and it will be
properly lockless in the next patch

Signed-off-by: Davidlohr Bueso <davidlohr.bueso@hp.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ipc/msg.c