mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-23 05:31:28 +00:00
Fir corner case handling in vdisk_attach_tgt()
Signed-off-by: Bart Van Assche <bvanassche@acm.org> Reported-by: Sebastian Riemer <sebastian.riemer@profitbricks.com> Tested-by: Sebastian Riemer <sebastian.riemer@profitbricks.com> git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4642 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -954,8 +954,10 @@ static int vdisk_attach_tgt(struct scst_tgt_dev *tgt_dev)
|
||||
|
||||
if (!virt_dev->nullio && !virt_dev->cdrom_empty) {
|
||||
res = vdisk_open_fd(virt_dev);
|
||||
if (res != 0)
|
||||
if (res != 0) {
|
||||
virt_dev->tgt_dev_cnt--;
|
||||
goto out;
|
||||
}
|
||||
} else
|
||||
virt_dev->fd = NULL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user