File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -2784,9 +2784,11 @@ EXPORT_SYMBOL_GPL(scsi_internal_device_block_nowait);
2784
2784
static void scsi_device_block (struct scsi_device * sdev , void * data )
2785
2785
{
2786
2786
int err ;
2787
+ enum scsi_device_state state ;
2787
2788
2788
2789
mutex_lock (& sdev -> state_mutex );
2789
2790
err = __scsi_internal_device_block_nowait (sdev );
2791
+ state = sdev -> sdev_state ;
2790
2792
if (err == 0 )
2791
2793
/*
2792
2794
* scsi_stop_queue() must be called with the state_mutex
@@ -2797,8 +2799,8 @@ static void scsi_device_block(struct scsi_device *sdev, void *data)
2797
2799
2798
2800
mutex_unlock (& sdev -> state_mutex );
2799
2801
2800
- WARN_ONCE (err , "__scsi_internal_device_block_nowait(%s) failed: err = %d\n" ,
2801
- dev_name (& sdev -> sdev_gendev ), err );
2802
+ WARN_ONCE (err , "%s: failed to block %s in state %d\n" ,
2803
+ __func__ , dev_name (& sdev -> sdev_gendev ), state );
2802
2804
}
2803
2805
2804
2806
/**
You can’t perform that action at this time.
0 commit comments