scst_vdisk: shared FD must be open with the least restricted mode

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6533 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2015-10-07 02:35:36 +00:00
parent 1be8004ca7
commit a975c37117
+1 -1
View File
@@ -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;