x86: compat_binfmt_elf Kconfig
[powerpc.git] / fs / xfs / xfs_mount.c
index 4f3488a..ebdb76d 100644 (file)
@@ -139,7 +139,7 @@ xfs_mount_init(void)
        AIL_LOCKINIT(&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.
         */
@@ -174,7 +174,7 @@ xfs_mount_free(
        AIL_LOCK_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)
 {
@@ -359,7 +358,7 @@ xfs_initialize_perag(
        /* Clear the mount flag if no inode can overflow 32 bits
         * on this filesystem, or if specifically requested..
         */
-       if ((vfs->vfs_flag & VFS_32BITINODES) && ino > max_inum) {
+       if ((mp->m_flags & XFS_MOUNT_SMALL_INUMS) && ino > max_inum) {
                mp->m_flags |= XFS_MOUNT_32BITINODES;
        } else {
                mp->m_flags &= ~XFS_MOUNT_32BITINODES;
@@ -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)
 {
@@ -875,14 +873,11 @@ xfs_mountfs(
         */
        if ((mfsi_flags & XFS_MFSI_SECOND) == 0 &&
            (mp->m_flags & XFS_MOUNT_NOUUID) == 0) {
-               __uint64_t      ret64;
                if (xfs_uuid_mount(mp)) {
                        error = XFS_ERROR(EINVAL);
                        goto error1;
                }
                uuid_mounted=1;
-               ret64 = uuid_hash64(&sbp->sb_uuid);
-               memcpy(&vfsp->vfs_fsid, &ret64, sizeof(ret64));
        }
 
        /*
@@ -1007,16 +1002,6 @@ xfs_mountfs(
         */
        uuid_getnodeuniq(&sbp->sb_uuid, mp->m_fixedfsid);
 
-       /*
-        *  The vfs structure needs to have a file system independent
-        *  way of checking for the invariant file system ID.  Since it
-        *  can't look at mount structures it has a pointer to the data
-        *  in the mount structure.
-        *
-        *  File systems that don't support user level file handles (i.e.
-        *  all of them except for XFS) will leave vfs_altfsid as NULL.
-        */
-       vfsp->vfs_altfsid = (xfs_fsid_t *)mp->m_fixedfsid;
        mp->m_dmevmask = 0;     /* not persistent; set after each mount */
 
        xfs_dir_mount(mp);
@@ -1038,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
@@ -1129,7 +1114,7 @@ xfs_mountfs(
         * If fs is not mounted readonly, then update the superblock
         * unit and width changes.
         */
-       if (update_flags && !(vfsp->vfs_flag & VFS_RDONLY))
+       if (update_flags && !(mp->m_flags & XFS_MOUNT_RDONLY))
                xfs_mount_log_sbunit(mp, update_flags);
 
        /*
@@ -1205,10 +1190,6 @@ xfs_mountfs(
 int
 xfs_unmountfs(xfs_mount_t *mp, struct cred *cr)
 {
-       struct bhv_vfs  *vfsp = XFS_MTOVFS(mp);
-#if defined(DEBUG) || defined(INDUCE_IO_ERROR)
-       int64_t         fsid;
-#endif
        __uint64_t      resblks;
 
        /*
@@ -1272,13 +1253,9 @@ xfs_unmountfs(xfs_mount_t *mp, struct cred *cr)
                xfs_uuid_unmount(mp);
 
 #if defined(DEBUG) || defined(INDUCE_IO_ERROR)
-       /*
-        * clear all error tags on this filesystem
-        */
-       memcpy(&fsid, &vfsp->vfs_fsid, sizeof(int64_t));
-       xfs_errortag_clearall_umount(fsid, mp->m_fsname, 0);
+       xfs_errortag_clearall(mp, 0);
 #endif
-       XFS_IODONE(vfsp);
+       XFS_IODONE(mp);
        xfs_mount_free(mp);
        return 0;
 }
@@ -1306,10 +1283,8 @@ 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) ||
-               (vfsp->vfs_flag & VFS_RDONLY));
+       return !(xfs_test_for_freeze(mp) || XFS_FORCED_SHUTDOWN(mp) ||
+               (mp->m_flags & XFS_MOUNT_RDONLY));
 }
 
 /*
@@ -1387,7 +1362,7 @@ xfs_unmountfs_writesb(xfs_mount_t *mp)
         * skip superblock write if fs is read-only, or
         * if we are doing a forced umount.
         */
-       if (!(XFS_MTOVFS(mp)->vfs_flag & VFS_RDONLY ||
+       if (!((mp->m_flags & XFS_MOUNT_RDONLY) ||
                XFS_FORCED_SHUTDOWN(mp))) {
 
                sbp = xfs_getsb(mp, 0);