Message ID | 20200513153443.3554-1-bstroesser@ts.fujitsu.com (mailing list archive) |
---|---|
State | Accepted |
Commit | f2e6b75f6ee82308ef7b00f29e71e5f1c6b3d52a |
Headers | show |
Series | [v2] scsi: target: put lun_ref at end of tmr processing | expand |
On Wed, 13 May 2020 17:34:43 +0200, Bodo Stroesser wrote: > Testing with Loopback I found, that after a Loopback LUN > has executed a TMR, I can no longer unlink the LUN. > The rm command hangs in transport_clear_lun_ref() at > wait_for_completion(&lun->lun_shutdown_comp) > The reason is, that transport_lun_remove_cmd() is not > called at the end of target_tmr_work(). > > [...] Applied to 5.7/scsi-fixes, thanks! [1/1] scsi: target: Put lun_ref at end of tmr processing https://git.kernel.org/mkp/scsi/c/f2e6b75f6ee8
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index 594b724bbf79..264a822c0bfa 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -3350,6 +3350,7 @@ static void target_tmr_work(struct work_struct *work) cmd->se_tfo->queue_tm_rsp(cmd); + transport_lun_remove_cmd(cmd); transport_cmd_check_stop_to_fabric(cmd); return;