]> git.baikalelectronics.ru Git - kernel.git/commit
genhd: Annotate all part and part_tbl pointer dereferences
authorBart Van Assche <bart.vanassche@wdc.com>
Thu, 17 Aug 2017 23:23:06 +0000 (16:23 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 18 Aug 2017 14:36:58 +0000 (08:36 -0600)
commit6be2c4dafe01d0d6702312f8b6336373a7849aed
tree00de4770e862d2d130a8c1260400dbbd3a56230e
parent01d754d132df5be63775cddb3fa08ba9583fee38
genhd: Annotate all part and part_tbl pointer dereferences

Annotate gendisk.part_tbl and disk_part_tbl.part dereferences with
rcu_dereference_protected(). This patch does not change the behavior
of the modified code but ensures that sparse does not complain about
disk->part_tbl manipulations nor about part_tbl->part accesses.
Additionally, improve documentation of the locking requirements of
the modified functions.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Jan Kara <jack@suse.cz>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/genhd.c
block/partition-generic.c