aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorDavid Chinner <dgc@sgi.com>2008-04-09 22:19:02 -0400
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-04-17 21:51:04 -0400
commit6b1d1a732f886936fe515d911b1a01d9cc50e179 (patch)
treeecfbef2372320ebf527dc7a70100d8d208d4e078 /fs
parent4679b2d36d53ed508c956337972fbbea8db99a77 (diff)
[XFS] Fix lock inversion in forced shutdown.
Recent changes to xlog_state_release_iclog() placed the grant_lock inside the icloglock. forced unmount of the log does this the opposite way around, but does not depend on the order for correct working. Fix the inversion by changing the order locks are gained in xfs_log_force_umount(). SGI-PV: 979661 SGI-Modid: xfs-linux-melb:xfs-kern:30773a Signed-off-by: David Chinner <dgc@sgi.com> Signed-off-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/xfs_log.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index 319b98eb410c..4a6f7c5d1459 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -3499,8 +3499,8 @@ xfs_log_force_umount(
3499 * before we mark the filesystem SHUTDOWN and wake 3499 * before we mark the filesystem SHUTDOWN and wake
3500 * everybody up to tell the bad news. 3500 * everybody up to tell the bad news.
3501 */ 3501 */
3502 spin_lock(&log->l_grant_lock);
3503 spin_lock(&log->l_icloglock); 3502 spin_lock(&log->l_icloglock);
3503 spin_lock(&log->l_grant_lock);
3504 mp->m_flags |= XFS_MOUNT_FS_SHUTDOWN; 3504 mp->m_flags |= XFS_MOUNT_FS_SHUTDOWN;
3505 XFS_BUF_DONE(mp->m_sb_bp); 3505 XFS_BUF_DONE(mp->m_sb_bp);
3506 /* 3506 /*