From: Ming Lei Date: Wed, 6 May 2015 04:26:24 +0000 (+0800) Subject: block: loop: fix another reread part failure X-Git-Tag: omap-for-v4.3/legacy-v2-signed~148^2~39 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=06f0e9e68c0d81c7d822a405f6e35686a711c1fe;p=pandora-kernel.git block: loop: fix another reread part failure loop_clr_fd() can be run piggyback with lo_release(), and under this situation, reread partition may always fail because bd_mutex has been held already. This patch detects the situation by the reference count, and call __blkdev_reread_part() to avoid acquiring the lock again. In the meantime, this patch switches to new kernel APIs of blkdev_reread_part() and __blkdev_reread_part(). Reviewed-by: Christoph Hellwig Tested-by: Jarod Wilson Acked-by: Jarod Wilson Signed-off-by: Jarod Wilson Signed-off-by: Ming Lei Signed-off-by: Jens Axboe --- Reading git-diff-tree failed