mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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 <[email protected]> Cc: Martin K. Petersen <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
This commit is contained in:
parent
13f6a91479
commit
ffe0067544
3 changed files with 3 additions and 3 deletions
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ sbc_emulate_readcapacity_16(struct se_cmd *cmd)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int spc_get_write_same_sectors(struct se_cmd *cmd)
|
||||
sector_t spc_get_write_same_sectors(struct se_cmd *cmd)
|
||||
{
|
||||
u32 num_blocks;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue