]> git.baikalelectronics.ru Git - kernel.git/commit
mqueue: switch to on-demand creation of internal mount
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 26 Dec 2017 00:43:35 +0000 (19:43 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 5 Jan 2018 16:54:37 +0000 (11:54 -0500)
commit6ede72279479eb44b1aec82b33da730fa6a33c62
treece8d6eddf34be533c2c12d6f68f916b9fb3dd035
parente776e19fc0c6c67961c00825b993f78f5414470c
mqueue: switch to on-demand creation of internal mount

Instead of doing that upon each ipcns creation, we do that the first
time mq_open(2) or mqueue mount is done in an ipcns.  What's more,
doing that allows to get rid of mount_ns() use - we can go with
considerably cheaper mount_nodev(), avoiding the loop over all
mqueue superblock instances; ipcns->mq_mnt is used to locate preexisting
instance in O(1) time instead of O(instances) mount_ns() would've
cost us.

Based upon the version by Giuseppe Scrivano <gscrivan@redhat.com>; I've
added handling of userland mqueue mounts (original had been broken in
that area) and added a switch to mount_nodev().

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
ipc/mqueue.c