OSDN Git Service

block: remove rcu_read_lock() from part_stat_lock()
authorKonstantin Khlebnikov <khlebnikov@yandex-team.ru>
Wed, 27 May 2020 05:24:17 +0000 (07:24 +0200)
committerJens Axboe <axboe@kernel.dk>
Wed, 27 May 2020 11:21:23 +0000 (05:21 -0600)
commit8ab1d40a646e753adb6814642432a093d93dbf47
treef70e9ee9cc1ea5823cba3865f380a597ef5db3ca
parentb5af37ab3a2b143e278340d2c6fa5790d53817e7
block: remove rcu_read_lock() from part_stat_lock()

The RCU lock is required only in disk_map_sector_rcu() to lookup the
partition.  After that request holds reference to related hd_struct.

Replace get_cpu() with preempt_disable() - returned cpu index is unused.

[hch: rebased]

Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/genhd.c
include/linux/part_stat.h