mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 02:39:48 +00:00
xen/blkfront: don't put bdev right after getting it
We should hang onto bdev until we're done with it. Signed-off-by: Andrew Jones <drjones@redhat.com> [v1: Fixed up git commit description] Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
This commit is contained in:
parent
34ae2e47d9
commit
dad5cf659b
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue