提交 dad5cf65 编写于 作者: A Andrew Jones 提交者: Jens Axboe

xen/blkfront: don't put bdev right after getting it

We should hang onto bdev until we're done with it.
Signed-off-by: NAndrew Jones <drjones@redhat.com>
[v1: Fixed up git commit description]
Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
上级 34ae2e47
......@@ -1409,7 +1409,6 @@ static int blkif_release(struct gendisk *disk, fmode_t mode)
mutex_lock(&blkfront_mutex);
bdev = bdget_disk(disk, 0);
bdput(bdev);
if (bdev->bd_openers)
goto out;
......@@ -1440,6 +1439,7 @@ static int blkif_release(struct gendisk *disk, fmode_t mode)
}
out:
bdput(bdev);
mutex_unlock(&blkfront_mutex);
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册