mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-16 18:21:27 +00:00
vdisk_fileio: Add additioinal consistency check for asynchronous I/O
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7918 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -3269,6 +3269,8 @@ static void fileio_async_complete(struct kiocb *iocb, long ret, long ret2)
|
||||
struct vdisk_cmd_params *p = container_of(iocb, typeof(*p), async.iocb);
|
||||
struct scst_cmd *cmd = p->cmd;
|
||||
|
||||
WARN_ON_ONCE(ret >= 0 && ret != cmd->bufflen);
|
||||
|
||||
if (ret < 0 &&
|
||||
scst_cmd_get_data_direction(cmd) & SCST_DATA_WRITE)
|
||||
scst_set_cmd_error(cmd,
|
||||
|
||||
Reference in New Issue
Block a user