]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
scsi: sd_zbc: Fix variable type and bogus comment
authorDamien Le Moal <damien.lemoal@wdc.com>
Tue, 3 Jul 2018 06:23:58 +0000 (15:23 +0900)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 6 Feb 2019 04:53:01 +0000 (04:53 +0000)
commitc68a75f6eb03df93724d81c1e97f7d52aa75e52b
treeb98e2d06cb806acce65d9fb89f760fb3803dfabe
parent1158556fbf75799a5ee9fd7da9ff0d147c677dfe
scsi: sd_zbc: Fix variable type and bogus comment

BugLink: http://bugs.launchpad.net/bugs/1812229
commit f13cff6c25bd8986627365346d123312ee7baa78 upstream.

Fix the description of sd_zbc_check_zone_size() to correctly explain that
the returned value is a number of device blocks, not bytes.  Additionally,
the 32 bits "ret" variable used in this function may truncate the 64 bits
zone_blocks variable value upon return. To fix this, change "ret" type to
s64.

Fixes: ccce20fc79 ("sd_zbc: Avoid that resetting a zone fails sporadically")
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Cc: Bart Van Assche <bart.vanassche@wdc.com>
Cc: stable@kernel.org
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/scsi/sd_zbc.c