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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Jan 2019 20:40:37 +0000 (21:40 +0100)
commitb8463897a29464d185cb7d3732da15e51cf086a3
tree1656432b3a433d15167a21b5fb980350dfdaeb8e
parentea5df5077091cbe9dda6b39b728c387055b6a548
loop: Push lo_ctl_mutex down into individual ioctls

commit a13165441d58b216adbd50252a9cc829d78a6bce upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/block/loop.c