浏览代码

[PATCH] libata: fast exit from EH while unloading

Make EH exit fast if the port is being unloaded.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Tejun Heo 19 年之前
父节点
当前提交
aeb2ecd609
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      drivers/scsi/libata-eh.c

+ 4 - 0
drivers/scsi/libata-eh.c

@@ -1680,6 +1680,10 @@ static int ata_eh_recover(struct ata_port *ap, ata_prereset_fn_t prereset,
 	down_xfermask = 0;
 	rc = 0;
 
+	/* if UNLOADING, finish immediately */
+	if (ap->flags & ATA_FLAG_UNLOADING)
+		goto out;
+
 	/* skip EH if possible. */
 	if (ata_eh_skip_recovery(ap))
 		ehc->i.action = 0;