Reject zero-sized discard IOs to core
Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
This commit is contained in:
parent
da34d5047b
commit
455d554dc1
@ -392,6 +392,11 @@ static void ocf_core_volume_submit_discard(struct ocf_io *io)
|
|||||||
|
|
||||||
OCF_CHECK_NULL(io);
|
OCF_CHECK_NULL(io);
|
||||||
|
|
||||||
|
if (io->bytes == 0) {
|
||||||
|
ocf_io_end(io, -OCF_ERR_INVAL);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ret = ocf_core_validate_io(io);
|
ret = ocf_core_validate_io(io);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
ocf_io_end(io, ret);
|
ocf_io_end(io, ret);
|
||||||
|
Loading…
Reference in New Issue
Block a user