diff options
| -rw-r--r-- | fs/xfs/xfs_mount.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c index 4d4161598406..081fb6a02ac3 100644 --- a/fs/xfs/xfs_mount.c +++ b/fs/xfs/xfs_mount.c | |||
| @@ -128,7 +128,7 @@ static const struct { | |||
| 128 | * initialized. | 128 | * initialized. |
| 129 | */ | 129 | */ |
| 130 | STATIC void | 130 | STATIC void |
| 131 | xfs_mount_free( | 131 | xfs_free_perag( |
| 132 | xfs_mount_t *mp) | 132 | xfs_mount_t *mp) |
| 133 | { | 133 | { |
| 134 | if (mp->m_perag) { | 134 | if (mp->m_perag) { |
| @@ -139,13 +139,6 @@ xfs_mount_free( | |||
| 139 | kmem_free(mp->m_perag[agno].pagb_list); | 139 | kmem_free(mp->m_perag[agno].pagb_list); |
| 140 | kmem_free(mp->m_perag); | 140 | kmem_free(mp->m_perag); |
| 141 | } | 141 | } |
| 142 | |||
| 143 | spinlock_destroy(&mp->m_ail_lock); | ||
| 144 | spinlock_destroy(&mp->m_sb_lock); | ||
| 145 | mutex_destroy(&mp->m_ilock); | ||
| 146 | mutex_destroy(&mp->m_growlock); | ||
| 147 | if (mp->m_quotainfo) | ||
| 148 | XFS_QM_DONE(mp); | ||
| 149 | } | 142 | } |
| 150 | 143 | ||
| 151 | /* | 144 | /* |
| @@ -922,7 +915,6 @@ xfs_mountfs( | |||
| 922 | __uint64_t resblks; | 915 | __uint64_t resblks; |
| 923 | __int64_t update_flags = 0LL; | 916 | __int64_t update_flags = 0LL; |
| 924 | uint quotamount, quotaflags; | 917 | uint quotamount, quotaflags; |
| 925 | int agno; | ||
| 926 | int uuid_mounted = 0; | 918 | int uuid_mounted = 0; |
| 927 | int error = 0; | 919 | int error = 0; |
| 928 | 920 | ||
| @@ -1216,12 +1208,7 @@ xfs_mountfs( | |||
| 1216 | error3: | 1208 | error3: |
| 1217 | xfs_log_unmount_dealloc(mp); | 1209 | xfs_log_unmount_dealloc(mp); |
| 1218 | error2: | 1210 | error2: |
| 1219 | for (agno = 0; agno < sbp->sb_agcount; agno++) | 1211 | xfs_free_perag(mp); |
| 1220 | if (mp->m_perag[agno].pagb_list) | ||
| 1221 | kmem_free(mp->m_perag[agno].pagb_list); | ||
| 1222 | kmem_free(mp->m_perag); | ||
| 1223 | mp->m_perag = NULL; | ||
| 1224 | /* FALLTHROUGH */ | ||
| 1225 | error1: | 1212 | error1: |
| 1226 | if (uuid_mounted) | 1213 | if (uuid_mounted) |
| 1227 | uuid_table_remove(&mp->m_sb.sb_uuid); | 1214 | uuid_table_remove(&mp->m_sb.sb_uuid); |
| @@ -1307,7 +1294,9 @@ xfs_unmountfs( | |||
| 1307 | #if defined(DEBUG) | 1294 | #if defined(DEBUG) |
| 1308 | xfs_errortag_clearall(mp, 0); | 1295 | xfs_errortag_clearall(mp, 0); |
| 1309 | #endif | 1296 | #endif |
| 1310 | xfs_mount_free(mp); | 1297 | xfs_free_perag(mp); |
| 1298 | if (mp->m_quotainfo) | ||
| 1299 | XFS_QM_DONE(mp); | ||
| 1311 | } | 1300 | } |
| 1312 | 1301 | ||
| 1313 | STATIC void | 1302 | STATIC void |
