Skip to content

Commit

Permalink
[XFS] Catch log unmount failures.
Browse files Browse the repository at this point in the history
Unmounting the log can fail. unlikely, but it can. Catch all the error
conditions an make sure it's propagated upwards.

SGI-PV: 980084
SGI-Modid: xfs-linux-melb:xfs-kern:30833a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
  • Loading branch information
David Chinner authored and Lachlan McIlroy committed Apr 18, 2008
1 parent b911ca0 commit 1bb7d6b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fs/xfs/xfs_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ xfs_log_unmount_write(xfs_mount_t *mp)
atomic_inc(&iclog->ic_refcnt);
spin_unlock(&log->l_icloglock);
xlog_state_want_sync(log, iclog);
(void) xlog_state_release_iclog(log, iclog);
error = xlog_state_release_iclog(log, iclog);

spin_lock(&log->l_icloglock);
if (!(iclog->ic_state == XLOG_STATE_ACTIVE ||
Expand Down Expand Up @@ -736,7 +736,7 @@ xfs_log_unmount_write(xfs_mount_t *mp)
spin_unlock(&log->l_icloglock);

xlog_state_want_sync(log, iclog);
(void) xlog_state_release_iclog(log, iclog);
error = xlog_state_release_iclog(log, iclog);

spin_lock(&log->l_icloglock);

Expand All @@ -751,7 +751,7 @@ xfs_log_unmount_write(xfs_mount_t *mp)
}
}

return 0;
return error;
} /* xfs_log_unmount_write */

/*
Expand Down

0 comments on commit 1bb7d6b

Please sign in to comment.