MFC r269122:

Fix infinite loop, when doing WRITE SAME on file-backed LUN.
This commit is contained in:
mav 2014-07-29 07:40:14 +00:00
parent 2dfd8b7dad
commit e6ff5c766b

View File

@ -725,10 +725,11 @@ ctl_be_block_dispatch_file(struct ctl_be_block_lun *be_lun,
}
/*
* If this is a write, we're all done.
* If this is a write or a verify, we're all done.
* If this is a read, we can now send the data to the user.
*/
if (ARGS(io)->flags & (CTL_LLF_WRITE | CTL_LLF_VERIFY)) {
if ((beio->bio_cmd == BIO_WRITE) ||
(ARGS(io)->flags & CTL_LLF_VERIFY)) {
ctl_set_success(&io->scsiio);
ctl_complete_beio(beio);
} else {