ipc,shm: introduce shmctl_nolock
authorDavidlohr Bueso <davidlohr.bueso@hp.com>
Wed, 11 Sep 2013 21:26:18 +0000 (14:26 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 11 Sep 2013 22:59:39 +0000 (15:59 -0700)
commit68eccc1dc345539d589ae78ee43b835c1a06a134
tree16943d2674537a5d13a14794763a3df7e51411ab
parent3b1c4ad37741e53804ffe0a30dd01e08b2ab6241
ipc,shm: introduce shmctl_nolock

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

Add a shmctl_nolock() function and move the logic of *_INFO and *_STAT out
of msgctl().  Since we are just moving functionality, 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>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
ipc/shm.c