If vfs_readv()/vfs_writev() are used, loff will be adjusted automatically

+ cleanup



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5001 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2013-09-13 09:32:35 +00:00
parent 5bd3752f7e
commit 9d1d74e7a8
+2 -4
View File
@@ -838,6 +838,8 @@ static int vdisk_attach(struct scst_device *dev)
goto out;
}
virt_dev->dev = dev;
dev->block_shift = virt_dev->blk_shift;
dev->block_size = 1 << dev->block_shift;
@@ -848,8 +850,6 @@ static int vdisk_attach(struct scst_device *dev)
goto out;
}
virt_dev->dev = dev;
dev->dev_rd_only = virt_dev->rd_only;
if (!virt_dev->cdrom_empty) {
@@ -3741,7 +3741,6 @@ static enum compl_status_e fileio_exec_read(struct vdisk_cmd_params *p)
if (finished)
break;
loff += full_len;
length = scst_get_buf_next(cmd, (uint8_t __force **)&address);
};
@@ -3896,7 +3895,6 @@ restart:
if (finished)
break;
loff += saved_full_len;
length = scst_get_buf_next(cmd, (uint8_t __force **)&address);
}