linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / fs / xfs / linux-2.6 / xfs_vfs.c
index 6145e8b..c855d62 100644 (file)
@@ -23,6 +23,7 @@
 #include "xfs_trans.h"
 #include "xfs_sb.h"
 #include "xfs_ag.h"
+#include "xfs_dir.h"
 #include "xfs_dir2.h"
 #include "xfs_imap.h"
 #include "xfs_alloc.h"
@@ -103,7 +104,7 @@ vfs_mntupdate(
 int
 vfs_root(
        struct bhv_desc         *bdp,
-       struct bhv_vnode        **vpp)
+       struct vnode            **vpp)
 {
        struct bhv_desc         *next = bdp;
 
@@ -116,15 +117,15 @@ vfs_root(
 int
 vfs_statvfs(
        struct bhv_desc         *bdp,
-       bhv_statvfs_t           *statp,
-       struct bhv_vnode        *vp)
+       xfs_statfs_t            *sp,
+       struct vnode            *vp)
 {
        struct bhv_desc         *next = bdp;
 
        ASSERT(next);
        while (! (bhvtovfsops(next))->vfs_statvfs)
                next = BHV_NEXT(next);
-       return ((*bhvtovfsops(next)->vfs_statvfs)(next, statp, vp));
+       return ((*bhvtovfsops(next)->vfs_statvfs)(next, sp, vp));
 }
 
 int
@@ -144,7 +145,7 @@ vfs_sync(
 int
 vfs_vget(
        struct bhv_desc         *bdp,
-       struct bhv_vnode        **vpp,
+       struct vnode            **vpp,
        struct fid              *fidp)
 {
        struct bhv_desc         *next = bdp;
@@ -186,7 +187,7 @@ vfs_quotactl(
 void
 vfs_init_vnode(
        struct bhv_desc         *bdp,
-       struct bhv_vnode        *vp,
+       struct vnode            *vp,
        struct bhv_desc         *bp,
        int                     unlock)
 {
@@ -225,46 +226,31 @@ vfs_freeze(
        ((*bhvtovfsops(next)->vfs_freeze)(next));
 }
 
-bhv_vfs_t *
-vfs_allocate(
-       struct super_block      *sb)
+vfs_t *
+vfs_allocate( void )
 {
-       struct bhv_vfs          *vfsp;
+       struct vfs              *vfsp;
 
-       vfsp = kmem_zalloc(sizeof(bhv_vfs_t), KM_SLEEP);
+       vfsp = kmem_zalloc(sizeof(vfs_t), KM_SLEEP);
        bhv_head_init(VFS_BHVHEAD(vfsp), "vfs");
        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;
 }
 
-bhv_vfs_t *
-vfs_from_sb(
-       struct super_block      *sb)
-{
-       return (bhv_vfs_t *)sb->s_fs_info;
-}
-
 void
 vfs_deallocate(
-       struct bhv_vfs          *vfsp)
+       struct vfs              *vfsp)
 {
        bhv_head_destroy(VFS_BHVHEAD(vfsp));
-       kmem_free(vfsp, sizeof(bhv_vfs_t));
+       kmem_free(vfsp, sizeof(vfs_t));
 }
 
 void
 vfs_insertops(
-       struct bhv_vfs          *vfsp,
-       struct bhv_module_vfsops *vfsops)
+       struct vfs              *vfsp,
+       struct bhv_vfsops       *vfsops)
 {
        struct bhv_desc         *bdp;
 
@@ -275,9 +261,9 @@ vfs_insertops(
 
 void
 vfs_insertbhv(
-       struct bhv_vfs          *vfsp,
+       struct vfs              *vfsp,
        struct bhv_desc         *bdp,
-       struct bhv_vfsops       *vfsops,
+       struct vfsops           *vfsops,
        void                    *mount)
 {
        bhv_desc_init(bdp, mount, vfsp, vfsops);
@@ -286,7 +272,7 @@ vfs_insertbhv(
 
 void
 bhv_remove_vfsops(
-       struct bhv_vfs          *vfsp,
+       struct vfs              *vfsp,
        int                     pos)
 {
        struct bhv_desc         *bhv;
@@ -300,7 +286,7 @@ bhv_remove_vfsops(
 
 void
 bhv_remove_all_vfsops(
-       struct bhv_vfs          *vfsp,
+       struct vfs              *vfsp,
        int                     freebase)
 {
        struct xfs_mount        *mp;
@@ -309,14 +295,14 @@ bhv_remove_all_vfsops(
        bhv_remove_vfsops(vfsp, VFS_POSITION_DM);
        if (!freebase)
                return;
-       mp = XFS_VFSTOM(vfsp);
+       mp = XFS_BHVTOM(bhv_lookup(VFS_BHVHEAD(vfsp), &xfs_vfsops));
        VFS_REMOVEBHV(vfsp, &mp->m_bhv);
        xfs_mount_free(mp, 0);
 }
 
 void
 bhv_insert_all_vfsops(
-       struct bhv_vfs          *vfsp)
+       struct vfs              *vfsp)
 {
        struct xfs_mount        *mp;