diff options
author | David Chinner <dgc@sgi.com> | 2007-02-10 02:35:15 -0500 |
---|---|---|
committer | Tim Shimmin <tes@sgi.com> | 2007-02-10 02:35:15 -0500 |
commit | 03135cf72621fccab57728f0ba3ab5a551df1cc1 (patch) | |
tree | 1ba21174dd2c0215e98c39d3ae09e09de06f0010 /fs/xfs/xfs_mount.c | |
parent | 20b642858b6bb413976ff13ae6a35cc596967bab (diff) |
[XFS] Fix UP build breakage due to undefined m_icsb_mutex.
SGI-PV: 952227
SGI-Modid: xfs-linux-melb:xfs-kern:27692a
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_mount.c')
-rw-r--r-- | fs/xfs/xfs_mount.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c index 37c612ce3d05..cbe729310eee 100644 --- a/fs/xfs/xfs_mount.c +++ b/fs/xfs/xfs_mount.c | |||
@@ -543,11 +543,11 @@ xfs_readsb(xfs_mount_t *mp, int flags) | |||
543 | ASSERT(XFS_BUF_VALUSEMA(bp) <= 0); | 543 | ASSERT(XFS_BUF_VALUSEMA(bp) <= 0); |
544 | } | 544 | } |
545 | 545 | ||
546 | mutex_lock(&mp->m_icsb_mutex); | 546 | xfs_icsb_lock(mp); |
547 | xfs_icsb_balance_counter(mp, XFS_SBS_ICOUNT, 0, 0); | 547 | xfs_icsb_balance_counter(mp, XFS_SBS_ICOUNT, 0, 0); |
548 | xfs_icsb_balance_counter(mp, XFS_SBS_IFREE, 0, 0); | 548 | xfs_icsb_balance_counter(mp, XFS_SBS_IFREE, 0, 0); |
549 | xfs_icsb_balance_counter(mp, XFS_SBS_FDBLOCKS, 0, 0); | 549 | xfs_icsb_balance_counter(mp, XFS_SBS_FDBLOCKS, 0, 0); |
550 | mutex_unlock(&mp->m_icsb_mutex); | 550 | xfs_icsb_unlock(mp); |
551 | 551 | ||
552 | mp->m_sb_bp = bp; | 552 | mp->m_sb_bp = bp; |
553 | xfs_buf_relse(bp); | 553 | xfs_buf_relse(bp); |
@@ -1736,17 +1736,17 @@ xfs_icsb_cpu_notify( | |||
1736 | memset(cntp, 0, sizeof(xfs_icsb_cnts_t)); | 1736 | memset(cntp, 0, sizeof(xfs_icsb_cnts_t)); |
1737 | break; | 1737 | break; |
1738 | case CPU_ONLINE: | 1738 | case CPU_ONLINE: |
1739 | mutex_lock(&mp->m_icsb_mutex); | 1739 | xfs_icsb_lock(mp); |
1740 | xfs_icsb_balance_counter(mp, XFS_SBS_ICOUNT, 0, 0); | 1740 | xfs_icsb_balance_counter(mp, XFS_SBS_ICOUNT, 0, 0); |
1741 | xfs_icsb_balance_counter(mp, XFS_SBS_IFREE, 0, 0); | 1741 | xfs_icsb_balance_counter(mp, XFS_SBS_IFREE, 0, 0); |
1742 | xfs_icsb_balance_counter(mp, XFS_SBS_FDBLOCKS, 0, 0); | 1742 | xfs_icsb_balance_counter(mp, XFS_SBS_FDBLOCKS, 0, 0); |
1743 | mutex_unlock(&mp->m_icsb_mutex); | 1743 | xfs_icsb_unlock(mp); |
1744 | break; | 1744 | break; |
1745 | case CPU_DEAD: | 1745 | case CPU_DEAD: |
1746 | /* Disable all the counters, then fold the dead cpu's | 1746 | /* Disable all the counters, then fold the dead cpu's |
1747 | * count into the total on the global superblock and | 1747 | * count into the total on the global superblock and |
1748 | * re-enable the counters. */ | 1748 | * re-enable the counters. */ |
1749 | mutex_lock(&mp->m_icsb_mutex); | 1749 | xfs_icsb_lock(mp); |
1750 | s = XFS_SB_LOCK(mp); | 1750 | s = XFS_SB_LOCK(mp); |
1751 | xfs_icsb_disable_counter(mp, XFS_SBS_ICOUNT); | 1751 | xfs_icsb_disable_counter(mp, XFS_SBS_ICOUNT); |
1752 | xfs_icsb_disable_counter(mp, XFS_SBS_IFREE); | 1752 | xfs_icsb_disable_counter(mp, XFS_SBS_IFREE); |
@@ -1765,7 +1765,7 @@ xfs_icsb_cpu_notify( | |||
1765 | xfs_icsb_balance_counter(mp, XFS_SBS_FDBLOCKS, | 1765 | xfs_icsb_balance_counter(mp, XFS_SBS_FDBLOCKS, |
1766 | XFS_ICSB_SB_LOCKED, 0); | 1766 | XFS_ICSB_SB_LOCKED, 0); |
1767 | XFS_SB_UNLOCK(mp, s); | 1767 | XFS_SB_UNLOCK(mp, s); |
1768 | mutex_unlock(&mp->m_icsb_mutex); | 1768 | xfs_icsb_unlock(mp); |
1769 | break; | 1769 | break; |
1770 | } | 1770 | } |
1771 | 1771 | ||
@@ -1813,6 +1813,7 @@ xfs_icsb_destroy_counters( | |||
1813 | unregister_hotcpu_notifier(&mp->m_icsb_notifier); | 1813 | unregister_hotcpu_notifier(&mp->m_icsb_notifier); |
1814 | free_percpu(mp->m_sb_cnts); | 1814 | free_percpu(mp->m_sb_cnts); |
1815 | } | 1815 | } |
1816 | mutex_destroy(&mp->m_icsb_mutex); | ||
1816 | } | 1817 | } |
1817 | 1818 | ||
1818 | STATIC_INLINE void | 1819 | STATIC_INLINE void |
@@ -2156,7 +2157,7 @@ slow_path: | |||
2156 | * the superblock lock. We still need to hold the superblock | 2157 | * the superblock lock. We still need to hold the superblock |
2157 | * lock, however, when we modify the global structures. | 2158 | * lock, however, when we modify the global structures. |
2158 | */ | 2159 | */ |
2159 | mutex_lock(&mp->m_icsb_mutex); | 2160 | xfs_icsb_lock(mp); |
2160 | 2161 | ||
2161 | /* | 2162 | /* |
2162 | * Now running atomically. | 2163 | * Now running atomically. |
@@ -2165,7 +2166,7 @@ slow_path: | |||
2165 | * Drop the lock and try again in the fast path.... | 2166 | * Drop the lock and try again in the fast path.... |
2166 | */ | 2167 | */ |
2167 | if (!(xfs_icsb_counter_disabled(mp, field))) { | 2168 | if (!(xfs_icsb_counter_disabled(mp, field))) { |
2168 | mutex_unlock(&mp->m_icsb_mutex); | 2169 | xfs_icsb_unlock(mp); |
2169 | goto again; | 2170 | goto again; |
2170 | } | 2171 | } |
2171 | 2172 | ||
@@ -2192,7 +2193,7 @@ slow_path: | |||
2192 | */ | 2193 | */ |
2193 | if (ret != ENOSPC) | 2194 | if (ret != ENOSPC) |
2194 | xfs_icsb_balance_counter(mp, field, 0, 0); | 2195 | xfs_icsb_balance_counter(mp, field, 0, 0); |
2195 | mutex_unlock(&mp->m_icsb_mutex); | 2196 | xfs_icsb_unlock(mp); |
2196 | return ret; | 2197 | return ret; |
2197 | 2198 | ||
2198 | balance_counter: | 2199 | balance_counter: |
@@ -2205,7 +2206,7 @@ balance_counter: | |||
2205 | * do more balances than strictly necessary but it is not | 2206 | * do more balances than strictly necessary but it is not |
2206 | * the common slowpath case. | 2207 | * the common slowpath case. |
2207 | */ | 2208 | */ |
2208 | mutex_lock(&mp->m_icsb_mutex); | 2209 | xfs_icsb_lock(mp); |
2209 | 2210 | ||
2210 | /* | 2211 | /* |
2211 | * running atomically. | 2212 | * running atomically. |
@@ -2216,7 +2217,7 @@ balance_counter: | |||
2216 | * another balance operation being required. | 2217 | * another balance operation being required. |
2217 | */ | 2218 | */ |
2218 | xfs_icsb_balance_counter(mp, field, 0, delta); | 2219 | xfs_icsb_balance_counter(mp, field, 0, delta); |
2219 | mutex_unlock(&mp->m_icsb_mutex); | 2220 | xfs_icsb_unlock(mp); |
2220 | goto again; | 2221 | goto again; |
2221 | } | 2222 | } |
2222 | 2223 | ||