]> git.baikalelectronics.ru Git - kernel.git/commit
block: Fix dev_t minor allocation lifetime
authorKeith Busch <keith.busch@intel.com>
Tue, 26 Aug 2014 15:05:36 +0000 (09:05 -0600)
committerJens Axboe <axboe@fb.com>
Wed, 3 Sep 2014 21:01:02 +0000 (15:01 -0600)
commitb53b36143d71717b47e050f48e703b5638d6051a
tree9f245a022542d626c948ebfb886106ce3f7e62ae
parentd20fb62f229ddb26c36ee6336ceaa00f33bf0e6a
block: Fix dev_t minor allocation lifetime

Releases the dev_t minor when all references are closed to prevent
another device from acquiring the same major/minor.

Since the partition's release may be invoked from call_rcu's soft-irq
context, the ext_dev_idr's mutex had to be replaced with a spinlock so
as not so sleep.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Cc: stable@kernel.org
Signed-off-by: Jens Axboe <axboe@fb.com>
block/genhd.c
block/partition-generic.c