Message ID | 20241010093835.1506926-1-yebin@huaweicloud.com (mailing list archive) |
---|---|
State | Under Review |
Headers | show |
Series | xfs: fix dead loop when do mount with IO fault injection | expand |
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index 817ea7e0a8ab..b91892733b78 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c @@ -765,7 +765,9 @@ xfs_log_mount_finish( } else { xfs_info(mp, "Ending clean mount"); } - xfs_buftarg_drain(mp->m_ddev_targp); + + if (!error) + xfs_buftarg_drain(mp->m_ddev_targp); clear_bit(XLOG_RECOVERY_NEEDED, &log->l_opstate);