Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 263296
b: refs/heads/master
c: 7abbe7f
h: refs/heads/master
v: v3
  • Loading branch information
Nicholas Bellinger committed Aug 22, 2011
1 parent fbdf2da commit 699d0fb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 72f4ba1e32a1e5da31dcf14ea4b8985ae88a8bdb
refs/heads/master: 7abbe7f3e4243e28a9169ee1b8d76f10a6f5d37c
14 changes: 7 additions & 7 deletions trunk/drivers/target/target_core_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -2853,12 +2853,10 @@ static int transport_cmd_get_valid_sectors(struct se_cmd *cmd)
" transport_dev_end_lba(): %llu\n",
cmd->t_task_lba, sectors,
transport_dev_end_lba(dev));
pr_err(" We should return CHECK_CONDITION"
" but we don't yet\n");
return 0;
return -EINVAL;
}

return sectors;
return 0;
}

static int target_check_write_same_discard(unsigned char *flags, struct se_device *dev)
Expand Down Expand Up @@ -3350,10 +3348,12 @@ static int transport_generic_cmd_sequencer(
cmd->se_cmd_flags |= SCF_EMULATE_CDB_ASYNC;
/*
* Check to ensure that LBA + Range does not exceed past end of
* device.
* device for IBLOCK and FILEIO ->do_sync_cache() backend calls
*/
if (!transport_cmd_get_valid_sectors(cmd))
goto out_invalid_cdb_field;
if ((cmd->t_task_lba != 0) || (sectors != 0)) {
if (transport_cmd_get_valid_sectors(cmd) < 0)
goto out_invalid_cdb_field;
}
break;
case UNMAP:
size = get_unaligned_be16(&cdb[7]);
Expand Down

0 comments on commit 699d0fb

Please sign in to comment.