diff options
author | Ming Lei <ming.lei@canonical.com> | 2015-05-06 12:26:24 +0800 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-05-20 09:06:11 -0600 |
commit | 06f0e9e68c0d81c7d822a405f6e35686a711c1fe (patch) | |
tree | edeba14fd08414b99402b9b2d94a6faf34f1cded /drivers/block/nbd.c | |
parent | f8933667953e8e61bb6104f5ca88e32e85656a93 (diff) | |
download | op-kernel-dev-06f0e9e68c0d81c7d822a405f6e35686a711c1fe.zip op-kernel-dev-06f0e9e68c0d81c7d822a405f6e35686a711c1fe.tar.gz |
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 <hch@lst.de>
Tested-by: Jarod Wilson <jarod@redhat.com>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/block/nbd.c')
0 files changed, 0 insertions, 0 deletions