loop: Push lo_ctl_mutex down into individual ioctls
authorJan Kara <jack@suse.cz>
Thu, 8 Nov 2018 13:01:05 +0000 (14:01 +0100)
committerJens Axboe <axboe@kernel.dk>
Thu, 8 Nov 2018 13:30:16 +0000 (06:30 -0700)
commita13165441d58b216adbd50252a9cc829d78a6bce
tree4235b3340065e70fa0fd569827ed9971921b008e
parent0a42e99b58a208839626465af194cfe640ef9493
loop: Push lo_ctl_mutex down into individual ioctls

Push acquisition of lo_ctl_mutex down into individual ioctl handling
branches. This is a preparatory step for pushing the lock down into
individual ioctl handling functions so that they can release the lock as
they need it. We also factor out some simple ioctl handlers that will
not need any special handling to reduce unnecessary code duplication.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/loop.c