diff options
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/xfs_log.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index 17ba92b115ea..7af9c292540b 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c @@ -602,24 +602,16 @@ xfs_log_release_iclog( struct xlog_in_core *iclog) { struct xlog *log = iclog->ic_log; - bool sync; - - if (iclog->ic_state == XLOG_STATE_IOERROR) - goto error; + bool sync = false; if (atomic_dec_and_lock(&iclog->ic_refcnt, &log->l_icloglock)) { - if (iclog->ic_state == XLOG_STATE_IOERROR) { - spin_unlock(&log->l_icloglock); - goto error; - } - sync = __xlog_state_release_iclog(log, iclog); + if (iclog->ic_state != XLOG_STATE_IOERROR) + sync = __xlog_state_release_iclog(log, iclog); spin_unlock(&log->l_icloglock); - if (sync) - xlog_sync(log, iclog); } - return; -error: - xfs_force_shutdown(log->l_mp, SHUTDOWN_LOG_IO_ERROR); + + if (sync) + xlog_sync(log, iclog); } /* |