diff options
author | 2012-11-27 19:07:52 -0800 | |
---|---|---|
committer | 2012-11-27 22:49:25 -0800 | |
commit | ffe0067544f93c0e71c793d7f17240486d091a3c (patch) | |
tree | d5008fdf846ed6f6575e65abe4c7bf7a267da2f1 /drivers/target/target_core_iblock.c | |
parent | target/configfs: use kmalloc() instead of kzalloc() for default groups (diff) | |
download | linux-ffe0067544f93c0e71c793d7f17240486d091a3c.tar.gz linux-ffe0067544f93c0e71c793d7f17240486d091a3c.tar.bz2 linux-ffe0067544f93c0e71c793d7f17240486d091a3c.zip |
target: Make spc_get_write_same_sectors return sector_t
We already expect TFO->get_blocks() to return sector_t for zero value case
when doing WRITE_SAME to the end of the backend device, so go ahead and return
sector_t from spc_get_write_same_sectors() to handle this case properly.
Also, update the single iblock_execute_write_same() caller of this code.
Cc: Christoph Hellwig <hch@lst.de>
Cc: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_iblock.c')
-rw-r--r-- | drivers/target/target_core_iblock.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/target/target_core_iblock.c b/drivers/target/target_core_iblock.c index 34f258b4d37f..b526d23dcd4f 100644 --- a/drivers/target/target_core_iblock.c +++ b/drivers/target/target_core_iblock.c @@ -481,7 +481,7 @@ iblock_execute_write_same(struct se_cmd *cmd) struct bio *bio; struct bio_list list; sector_t block_lba = cmd->t_task_lba; - unsigned int sectors = spc_get_write_same_sectors(cmd); + sector_t sectors = spc_get_write_same_sectors(cmd); sg = &cmd->t_data_sg[0]; |