On 2019-10-18 03:01, zhengbin wrote:
> @@ -1648,16 +1651,20 @@ static int sd_sync_cache(struct scsi_disk *sdkp,
> struct scsi_sense_hdr *sshdr)
> if (res) {
> sd_print_result(sdkp, "Synchronize Cache(10) failed", res);
>
> - if (driver_byte(res) == DRIVER_SENSE)
>
Like sd_pr_command, before use sshdr, we need to check the result of
scsi_execute and whether sshdr is valid.
Signed-off-by: zhengbin
---
drivers/scsi/sd.c | 57 ++-
1 file changed, 35 insertions(+), 22 deletions(-)
diff --git a/drivers/scsi/s
2 matches
Mail list logo