From: Keith Busch Date: Tue, 26 Aug 2014 15:05:36 +0000 (-0600) Subject: block: Fix dev_t minor allocation lifetime X-Git-Tag: v3.2.64~83 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a288cafeceb6e18ba4fd10ec8d3270593472cca6;p=pandora-kernel.git block: Fix dev_t minor allocation lifetime commit 2da78092dda13f1efd26edbbf99a567776913750 upstream. 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 Signed-off-by: Jens Axboe [bwh: Backported to 3.2: - Adjust filename - idr insertion API is different, and blk_alloc_devt() is preallocating a node in a different way] Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed