diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index e1dc27256..e37f034f9 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -1741,7 +1741,7 @@ static int vdisk_attach_tgt(struct scst_tgt_dev *tgt_dev) goto out; if (!virt_dev->nullio && !virt_dev->cdrom_empty) { - res = vdisk_open_fd(virt_dev, tgt_dev->tgt_dev_rd_only); + res = vdisk_open_fd(virt_dev, tgt_dev->dev->dev_rd_only); if (res != 0) { virt_dev->tgt_dev_cnt--; goto out;