From: Akinobu Mita Date: Tue, 16 Apr 2013 13:11:57 +0000 (+0900) Subject: [SCSI] scsi_debug: clear correct memory region when LBPRZ is enabled X-Git-Tag: v3.10-rc1~3^2~1^2~23 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc34a8e663b2908b9ab487dab8456d117a1e0b93;p=pandora-kernel.git [SCSI] scsi_debug: clear correct memory region when LBPRZ is enabled The function unmap_region() clears memory region specified as the logical block address and the number of logical blocks in ramdisk storage (fake_storep) if lbpu and lbprz module parameters are enabled. In the while loop of unmap_region(), it advances optimal unmap granularity in logical blocks. But it only clears one logical block at LBA 'block' per loop iteration. And furthermore, the 'block' is not pointing to a logical block address which should be cleared, it is a index of probisioning map (map_storep). Signed-off-by: Akinobu Mita Acked-by: Martin K. Petersen Signed-off-by: James Bottomley --- Reading git-diff-tree failed