aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/sd.c')
-rw-r--r--drivers/scsi/sd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 63bd01ae534f..20514c47a5aa 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -870,7 +870,7 @@ static int sd_release(struct gendisk *disk, fmode_t mode)
870 870
871 SCSI_LOG_HLQUEUE(3, sd_printk(KERN_INFO, sdkp, "sd_release\n")); 871 SCSI_LOG_HLQUEUE(3, sd_printk(KERN_INFO, sdkp, "sd_release\n"));
872 872
873 if (atomic_dec_return(&sdkp->openers) && sdev->removable) { 873 if (atomic_dec_return(&sdkp->openers) == 0 && sdev->removable) {
874 if (scsi_block_when_processing_errors(sdev)) 874 if (scsi_block_when_processing_errors(sdev))
875 scsi_set_medium_removal(sdev, SCSI_REMOVAL_ALLOW); 875 scsi_set_medium_removal(sdev, SCSI_REMOVAL_ALLOW);
876 } 876 }
@@ -2623,15 +2623,15 @@ module_exit(exit_sd);
2623static void sd_print_sense_hdr(struct scsi_disk *sdkp, 2623static void sd_print_sense_hdr(struct scsi_disk *sdkp,
2624 struct scsi_sense_hdr *sshdr) 2624 struct scsi_sense_hdr *sshdr)
2625{ 2625{
2626 sd_printk(KERN_INFO, sdkp, ""); 2626 sd_printk(KERN_INFO, sdkp, " ");
2627 scsi_show_sense_hdr(sshdr); 2627 scsi_show_sense_hdr(sshdr);
2628 sd_printk(KERN_INFO, sdkp, ""); 2628 sd_printk(KERN_INFO, sdkp, " ");
2629 scsi_show_extd_sense(sshdr->asc, sshdr->ascq); 2629 scsi_show_extd_sense(sshdr->asc, sshdr->ascq);
2630} 2630}
2631 2631
2632static void sd_print_result(struct scsi_disk *sdkp, int result) 2632static void sd_print_result(struct scsi_disk *sdkp, int result)
2633{ 2633{
2634 sd_printk(KERN_INFO, sdkp, ""); 2634 sd_printk(KERN_INFO, sdkp, " ");
2635 scsi_show_result(result); 2635 scsi_show_result(result);
2636} 2636}
2637 2637