]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/xfs/linux-2.6/xfs_vfs.c
Merge branch 'linus'
[linux-2.6-omap-h63xx.git] / fs / xfs / linux-2.6 / xfs_vfs.c
index c855d62e53440323998bfafe1a7de416431a8a1e..6f7c9f7a86246ee1f3e822b5e706417718f77406 100644 (file)
@@ -227,7 +227,8 @@ vfs_freeze(
 }
 
 vfs_t *
-vfs_allocate( void )
+vfs_allocate(
+       struct super_block      *sb)
 {
        struct vfs              *vfsp;
 
@@ -236,9 +237,23 @@ vfs_allocate( void )
        INIT_LIST_HEAD(&vfsp->vfs_sync_list);
        spin_lock_init(&vfsp->vfs_sync_lock);
        init_waitqueue_head(&vfsp->vfs_wait_single_sync_task);
+
+       vfsp->vfs_super = sb;
+       sb->s_fs_info = vfsp;
+
+       if (sb->s_flags & MS_RDONLY)
+               vfsp->vfs_flag |= VFS_RDONLY;
+
        return vfsp;
 }
 
+vfs_t *
+vfs_from_sb(
+       struct super_block      *sb)
+{
+       return (vfs_t *)sb->s_fs_info;
+}
+
 void
 vfs_deallocate(
        struct vfs              *vfsp)
@@ -295,7 +310,7 @@ bhv_remove_all_vfsops(
        bhv_remove_vfsops(vfsp, VFS_POSITION_DM);
        if (!freebase)
                return;
-       mp = XFS_BHVTOM(bhv_lookup(VFS_BHVHEAD(vfsp), &xfs_vfsops));
+       mp = XFS_VFSTOM(vfsp);
        VFS_REMOVEBHV(vfsp, &mp->m_bhv);
        xfs_mount_free(mp, 0);
 }