mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-20 14:16:31 +00:00
Improve handling of zero len unmap descriptors
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4413 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -1878,6 +1878,9 @@ static int vdisk_unmap_range(struct scst_cmd *cmd,
|
||||
|
||||
TRACE_ENTRY();
|
||||
|
||||
if (len == 0)
|
||||
goto success;
|
||||
|
||||
if ((start > virt_dev->nblocks) ||
|
||||
((start + len) > virt_dev->nblocks)) {
|
||||
PRINT_ERROR("Device %s: attempt to write beyond max "
|
||||
@@ -1947,6 +1950,7 @@ static int vdisk_unmap_range(struct scst_cmd *cmd,
|
||||
#endif
|
||||
}
|
||||
|
||||
success:
|
||||
res = 0;
|
||||
|
||||
out:
|
||||
|
||||
Reference in New Issue
Block a user