]> git.baikalelectronics.ru Git - kernel.git/commit
rbd: acquire header_rwsem just once in rbd_queue_workfn()
authorIlya Dryomov <idryomov@gmail.com>
Wed, 12 Feb 2020 14:08:39 +0000 (15:08 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 30 Mar 2020 10:42:40 +0000 (12:42 +0200)
commit126dc1afe79e1d6f6974ac84cd84992de9c984ca
treea1550825ed173615dad5067d470e6b6fa1f5d29b
parent563a8143ee8ee4f78539f12a81cdb92af8bab717
rbd: acquire header_rwsem just once in rbd_queue_workfn()

Currently header_rwsem is acquired twice: once in rbd_dev_parent_get()
when the image request is being created and then in rbd_queue_workfn()
to capture mapping_size and snapc.  Introduce rbd_img_capture_header()
and move image request allocation so that header_rwsem can be acquired
just once.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
drivers/block/rbd.c