[XFS] Unwrap AIL_LOCK
[safe/jmp/linux-2.6] / fs / xfs / xfs_mount.c
index 6b1aa7d..9a80b55 100644 (file)
@@ -136,10 +136,10 @@ xfs_mount_init(void)
                mp->m_flags |= XFS_MOUNT_NO_PERCPU_SB;
        }
 
-       AIL_LOCKINIT(&mp->m_ail_lock, "xfs_ail");
+       spinlock_init(&mp->m_ail_lock, "xfs_ail");
        spinlock_init(&mp->m_sb_lock, "xfs_sb");
        mutex_init(&mp->m_ilock);
-       initnsema(&mp->m_growlock, 1, "xfs_grow");
+       mutex_init(&mp->m_growlock);
        /*
         * Initialize the AIL.
         */
@@ -171,10 +171,10 @@ xfs_mount_free(
                          sizeof(xfs_perag_t) * mp->m_sb.sb_agcount);
        }
 
-       AIL_LOCK_DESTROY(&mp->m_ail_lock);
+       spinlock_destroy(&mp->m_ail_lock);
        spinlock_destroy(&mp->m_sb_lock);
        mutex_destroy(&mp->m_ilock);
-       freesema(&mp->m_growlock);
+       mutex_destroy(&mp->m_growlock);
        if (mp->m_quotainfo)
                XFS_QM_DONE(mp);
 
@@ -341,7 +341,6 @@ xfs_initialize_perag_icache(
 
 xfs_agnumber_t
 xfs_initialize_perag(
-       bhv_vfs_t       *vfs,
        xfs_mount_t     *mp,
        xfs_agnumber_t  agcount)
 {
@@ -748,7 +747,6 @@ xfs_initialize_perag_data(xfs_mount_t *mp, xfs_agnumber_t agcount)
  */
 int
 xfs_mountfs(
-       bhv_vfs_t       *vfsp,
        xfs_mount_t     *mp,
        int             mfsi_flags)
 {
@@ -1025,7 +1023,7 @@ xfs_mountfs(
        mp->m_perag =
                kmem_zalloc(sbp->sb_agcount * sizeof(xfs_perag_t), KM_SLEEP);
 
-       mp->m_maxagi = xfs_initialize_perag(vfsp, mp, sbp->sb_agcount);
+       mp->m_maxagi = xfs_initialize_perag(mp, sbp->sb_agcount);
 
        /*
         * log's mount-time initialization. Perform 1st part recovery if needed
@@ -1192,7 +1190,6 @@ xfs_mountfs(
 int
 xfs_unmountfs(xfs_mount_t *mp, struct cred *cr)
 {
-       struct bhv_vfs  *vfsp = XFS_MTOVFS(mp);
        __uint64_t      resblks;
 
        /*
@@ -1258,7 +1255,6 @@ xfs_unmountfs(xfs_mount_t *mp, struct cred *cr)
 #if defined(DEBUG) || defined(INDUCE_IO_ERROR)
        xfs_errortag_clearall(mp, 0);
 #endif
-       XFS_IODONE(vfsp);
        xfs_mount_free(mp);
        return 0;
 }
@@ -1286,9 +1282,7 @@ xfs_unmountfs_wait(xfs_mount_t *mp)
 int
 xfs_fs_writable(xfs_mount_t *mp)
 {
-       bhv_vfs_t       *vfsp = XFS_MTOVFS(mp);
-
-       return !(vfs_test_for_freeze(vfsp) || XFS_FORCED_SHUTDOWN(mp) ||
+       return !(xfs_test_for_freeze(mp) || XFS_FORCED_SHUTDOWN(mp) ||
                (mp->m_flags & XFS_MOUNT_RDONLY));
 }