]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[XFS] kill struct bhv_vfs
authorChristoph Hellwig <hch@infradead.org>
Thu, 30 Aug 2007 07:21:30 +0000 (17:21 +1000)
committerTim Shimmin <tes@chook.melbourne.sgi.com>
Tue, 16 Oct 2007 02:17:27 +0000 (12:17 +1000)
Now that struct bhv_vfs doesn't have any members left we can kill it and
go directly from the super_block to the xfs_mount everywhere.

SGI-PV: 969608
SGI-Modid: xfs-linux-melb:xfs-kern:29509a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
14 files changed:
fs/xfs/Makefile-linux-2.6
fs/xfs/linux-2.6/xfs_lrw.c
fs/xfs/linux-2.6/xfs_super.c
fs/xfs/linux-2.6/xfs_super.h
fs/xfs/linux-2.6/xfs_vfs.c [deleted file]
fs/xfs/linux-2.6/xfs_vfs.h
fs/xfs/linux-2.6/xfs_vnode.h
fs/xfs/xfs_fsops.c
fs/xfs/xfs_iget.c
fs/xfs/xfs_iocore.c
fs/xfs/xfs_mount.c
fs/xfs/xfs_mount.h
fs/xfs/xfs_trans.c
fs/xfs/xfs_vfsops.c

index 85b0de65bd9b325595b9a3149fe123212ca5002a..d1491aa7a0e29da822b9924d45a626945c17fffe 100644 (file)
@@ -107,7 +107,6 @@ xfs-y                               += $(addprefix $(XFS_LINUX)/, \
                                   xfs_iops.o \
                                   xfs_lrw.o \
                                   xfs_super.o \
-                                  xfs_vfs.o \
                                   xfs_vnode.o)
 
 # Objects in support/
index 5b95a7297fd1a0e7c425e2078d38c801af28360e..5d284403b4117ccb04cfbe04be46a4a9a62bc19b 100644 (file)
@@ -621,7 +621,7 @@ xfs_write(
        io = &xip->i_iocore;
        mp = io->io_mount;
 
-       vfs_wait_for_freeze(XFS_MTOVFS(mp), SB_FREEZE_WRITE);
+       xfs_wait_for_freeze(mp, SB_FREEZE_WRITE);
 
        if (XFS_FORCED_SHUTDOWN(mp))
                return -EIO;
index 3ce9426f57d86a4000c10726374f5963272bd408..a1e3f3ea334b8b97db7d538b22427d7d2f6814be 100644 (file)
@@ -511,7 +511,7 @@ xfs_flush_device_work(
        void            *arg)
 {
        struct inode    *inode = arg;
-       sync_blockdev(mp->m_vfsp->vfs_super->s_bdev);
+       sync_blockdev(mp->m_super->s_bdev);
        iput(inode);
 }
 
@@ -593,7 +593,6 @@ STATIC void
 xfs_fs_put_super(
        struct super_block      *sb)
 {
-       bhv_vfs_t               *vfsp = vfs_from_sb(sb);
        struct xfs_mount        *mp = XFS_M(sb);
        int                     error;
 
@@ -601,12 +600,8 @@ xfs_fs_put_super(
 
        xfs_sync(mp, SYNC_ATTR | SYNC_DELWRI);
        error = xfs_unmount(mp, 0, NULL);
-       if (error) {
+       if (error)
                printk("XFS: unmount got error=%d\n", error);
-               printk("%s: vfs=0x%p left dangling!\n", __FUNCTION__, vfsp);
-       } else {
-               vfs_deallocate(vfsp);
-       }
 }
 
 STATIC void
@@ -764,7 +759,6 @@ xfs_fs_fill_super(
        int                     silent)
 {
        struct inode            *rootvp;
-       struct bhv_vfs          *vfsp = vfs_allocate(sb);
        struct xfs_mount        *mp = NULL;
        struct xfs_mount_args   *args = xfs_args_allocate(sb, silent);
        struct kstatfs          statvfs;
@@ -776,8 +770,8 @@ xfs_fs_fill_super(
        spin_lock_init(&mp->m_sync_lock);
        init_waitqueue_head(&mp->m_wait_single_sync_task);
 
-       mp->m_vfsp = vfsp;
-       vfsp->vfs_mount = mp;
+       mp->m_super = sb;
+       sb->s_fs_info = mp;
 
        if (sb->s_flags & MS_RDONLY)
                mp->m_flags |= XFS_MOUNT_RDONLY;
@@ -847,7 +841,6 @@ fail_unmount:
        xfs_unmount(mp, 0, NULL);
 
 fail_vfsop:
-       vfs_deallocate(vfsp);
        kmem_free(args, sizeof(*args));
        return -error;
 }
index 529ada86f2c9544f3eddb2613cfae7e39ee096d9..c78c23310fe85296f00affc28796fe58d419c544 100644 (file)
@@ -120,7 +120,6 @@ extern void xfs_blkdev_issue_flush(struct xfs_buftarg *);
 
 extern struct export_operations xfs_export_operations;
 
-#define XFS_M(sb) \
-       XFS_VFSTOM(vfs_from_sb(sb))
+#define XFS_M(sb)              ((struct xfs_mount *)((sb)->s_fs_info))
 
 #endif /* __XFS_SUPER_H__ */
diff --git a/fs/xfs/linux-2.6/xfs_vfs.c b/fs/xfs/linux-2.6/xfs_vfs.c
deleted file mode 100644 (file)
index 97ce2ea..0000000
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
- * Copyright (c) 2000-2005 Silicon Graphics, Inc.
- * All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write the Free Software Foundation,
- * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-#include "xfs.h"
-#include "xfs_fs.h"
-#include "xfs_inum.h"
-#include "xfs_log.h"
-#include "xfs_clnt.h"
-#include "xfs_trans.h"
-#include "xfs_sb.h"
-#include "xfs_ag.h"
-#include "xfs_dir2.h"
-#include "xfs_imap.h"
-#include "xfs_alloc.h"
-#include "xfs_dmapi.h"
-#include "xfs_mount.h"
-#include "xfs_quota.h"
-
-int
-vfs_mount(
-       struct bhv_desc         *bdp,
-       struct xfs_mount_args   *args,
-       struct cred             *cr)
-{
-       struct bhv_desc         *next = bdp;
-
-       ASSERT(next);
-       while (! (bhvtovfsops(next))->vfs_mount)
-               next = BHV_NEXT(next);
-       return ((*bhvtovfsops(next)->vfs_mount)(next, args, cr));
-}
-
-int
-vfs_parseargs(
-       struct bhv_desc         *bdp,
-       char                    *s,
-       struct xfs_mount_args   *args,
-       int                     f)
-{
-       struct bhv_desc         *next = bdp;
-
-       ASSERT(next);
-       while (! (bhvtovfsops(next))->vfs_parseargs)
-               next = BHV_NEXT(next);
-       return ((*bhvtovfsops(next)->vfs_parseargs)(next, s, args, f));
-}
-
-int
-vfs_showargs(
-       struct bhv_desc         *bdp,
-       struct seq_file         *m)
-{
-       struct bhv_desc         *next = bdp;
-
-       ASSERT(next);
-       while (! (bhvtovfsops(next))->vfs_showargs)
-               next = BHV_NEXT(next);
-       return ((*bhvtovfsops(next)->vfs_showargs)(next, m));
-}
-
-int
-vfs_unmount(
-       struct bhv_desc         *bdp,
-       int                     fl,
-       struct cred             *cr)
-{
-       struct bhv_desc         *next = bdp;
-
-       ASSERT(next);
-       while (! (bhvtovfsops(next))->vfs_unmount)
-               next = BHV_NEXT(next);
-       return ((*bhvtovfsops(next)->vfs_unmount)(next, fl, cr));
-}
-
-int
-vfs_mntupdate(
-       struct bhv_desc         *bdp,
-       int                     *fl,
-       struct xfs_mount_args   *args)
-{
-       struct bhv_desc         *next = bdp;
-
-       ASSERT(next);
-       while (! (bhvtovfsops(next))->vfs_mntupdate)
-               next = BHV_NEXT(next);
-       return ((*bhvtovfsops(next)->vfs_mntupdate)(next, fl, args));
-}
-
-int
-vfs_root(
-       struct bhv_desc         *bdp,
-       bhv_vnode_t             **vpp)
-{
-       struct bhv_desc         *next = bdp;
-
-       ASSERT(next);
-       while (! (bhvtovfsops(next))->vfs_root)
-               next = BHV_NEXT(next);
-       return ((*bhvtovfsops(next)->vfs_root)(next, vpp));
-}
-
-int
-vfs_statvfs(
-       struct bhv_desc         *bdp,
-       bhv_statvfs_t           *statp,
-       bhv_vnode_t             *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));
-}
-
-int
-vfs_sync(
-       struct bhv_desc         *bdp,
-       int                     fl,
-       struct cred             *cr)
-{
-       struct bhv_desc         *next = bdp;
-
-       ASSERT(next);
-       while (! (bhvtovfsops(next))->vfs_sync)
-               next = BHV_NEXT(next);
-       return ((*bhvtovfsops(next)->vfs_sync)(next, fl, cr));
-}
-
-int
-vfs_vget(
-       struct bhv_desc         *bdp,
-       bhv_vnode_t             **vpp,
-       struct fid              *fidp)
-{
-       struct bhv_desc         *next = bdp;
-
-       ASSERT(next);
-       while (! (bhvtovfsops(next))->vfs_vget)
-               next = BHV_NEXT(next);
-       return ((*bhvtovfsops(next)->vfs_vget)(next, vpp, fidp));
-}
-
-void
-vfs_init_vnode(
-       struct bhv_desc         *bdp,
-       bhv_vnode_t             *vp,
-       struct xfs_inode        *ip,
-       int                     unlock)
-{
-       struct bhv_desc         *next = bdp;
-
-       ASSERT(next);
-       while (! (bhvtovfsops(next))->vfs_init_vnode)
-               next = BHV_NEXT(next);
-       ((*bhvtovfsops(next)->vfs_init_vnode)(next, vp, ip, unlock));
-}
-
-void
-vfs_force_shutdown(
-       struct bhv_desc         *bdp,
-       int                     fl,
-       char                    *file,
-       int                     line)
-{
-       struct bhv_desc         *next = bdp;
-
-       ASSERT(next);
-       while (! (bhvtovfsops(next))->vfs_force_shutdown)
-               next = BHV_NEXT(next);
-       ((*bhvtovfsops(next)->vfs_force_shutdown)(next, fl, file, line));
-}
-
-void
-vfs_freeze(
-       struct bhv_desc         *bdp)
-{
-       struct bhv_desc         *next = bdp;
-
-       ASSERT(next);
-       while (! (bhvtovfsops(next))->vfs_freeze)
-               next = BHV_NEXT(next);
-       ((*bhvtovfsops(next)->vfs_freeze)(next));
-}
-
-bhv_vfs_t *
-vfs_allocate(
-       struct super_block      *sb)
-{
-       struct bhv_vfs          *vfsp;
-
-       vfsp = kmem_zalloc(sizeof(bhv_vfs_t), KM_SLEEP);
-
-       vfsp->vfs_super = sb;
-       sb->s_fs_info = vfsp;
-
-       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)
-{
-       kmem_free(vfsp, sizeof(bhv_vfs_t));
-}
index 51906192e70adb87d9f1dcefdb04cffdc5bc05a9..4da03a4e3520d97866d710f9977e95c0b2ae1961 100644 (file)
@@ -21,7 +21,6 @@
 #include <linux/vfs.h>
 #include "xfs_fs.h"
 
-struct bhv_vfs;
 struct inode;
 
 struct fid;
@@ -41,11 +40,6 @@ typedef struct bhv_vfs_sync_work {
        void                    (*w_syncer)(struct xfs_mount *, void *);
 } bhv_vfs_sync_work_t;
 
-typedef struct bhv_vfs {
-       struct xfs_mount        *vfs_mount;
-       struct super_block      *vfs_super;     /* generic superblock pointer */
-} bhv_vfs_t;
-
 #define SYNC_ATTR              0x0001  /* sync attributes */
 #define SYNC_CLOSE             0x0002  /* close file system down */
 #define SYNC_DELWRI            0x0004  /* look at delayed writes */
@@ -78,11 +72,7 @@ typedef struct bhv_vfs {
 #define SHUTDOWN_REMOTE_REQ    0x0010  /* shutdown came from remote cell */
 #define SHUTDOWN_DEVICE_REQ    0x0020  /* failed all paths to the device */
 
-#define vfs_test_for_freeze(vfs)       ((vfs)->vfs_super->s_frozen)
-#define vfs_wait_for_freeze(vfs,l)     vfs_check_frozen((vfs)->vfs_super, (l))
-extern bhv_vfs_t *vfs_allocate(struct super_block *);
-extern bhv_vfs_t *vfs_from_sb(struct super_block *);
-extern void vfs_deallocate(bhv_vfs_t *);
+#define xfs_test_for_freeze(mp)                ((mp)->m_super->s_frozen)
+#define xfs_wait_for_freeze(mp,l)      vfs_check_frozen((mp)->m_super, (l))
 
 #endif /* __XFS_VFS_H__ */
index 4682c617f3a4cb5a6b7d60065a0bcca8eebcc3aa..55fb469485892d8d667dd866d46f5a61d875add0 100644 (file)
@@ -19,7 +19,6 @@
 #define __XFS_VNODE_H__
 
 struct file;
-struct bhv_vfs;
 struct bhv_vattr;
 struct xfs_iomap;
 struct attrlist_cursor_kern;
index 3d27909770ea1f1b2edfe49c754fc006ae1aa02c..94bd9f2d9d77d807ebbd19b4e2be8a10c92dcbcc 100644 (file)
@@ -174,7 +174,7 @@ xfs_growfs_data_private(
                memset(&mp->m_perag[oagcount], 0,
                        (nagcount - oagcount) * sizeof(xfs_perag_t));
                mp->m_flags |= XFS_MOUNT_32BITINODES;
-               nagimax = xfs_initialize_perag(XFS_MTOVFS(mp), mp, nagcount);
+               nagimax = xfs_initialize_perag(mp, nagcount);
                up_write(&mp->m_peraglock);
        }
        tp = xfs_trans_alloc(mp, XFS_TRANS_GROWFS);
@@ -626,8 +626,7 @@ xfs_fs_goingdown(
 {
        switch (inflags) {
        case XFS_FSOP_GOING_FLAGS_DEFAULT: {
-               struct bhv_vfs *vfsp = XFS_MTOVFS(mp);
-               struct super_block *sb = freeze_bdev(vfsp->vfs_super->s_bdev);
+               struct super_block *sb = freeze_bdev(mp->m_super->s_bdev);
 
                if (sb && !IS_ERR(sb)) {
                        xfs_force_shutdown(mp, SHUTDOWN_FORCE_UMOUNT);
index 772bbc7a8ac9e75be456b23447cf5df9e041ce69..488836e204a3493f968a9e473ce1b00eca67823d 100644 (file)
@@ -369,7 +369,7 @@ xfs_iget(
        XFS_STATS_INC(xs_ig_attempts);
 
 retry:
-       inode = iget_locked(XFS_MTOVFS(mp)->vfs_super, ino);
+       inode = iget_locked(mp->m_super, ino);
        if (inode) {
                xfs_inode_t     *ip;
 
index 81548ec72ba6073b2b910b79d74e8d763ce06fae..b27b5d5be841bb7078c1d48e9936ea32da22b6e5 100644 (file)
@@ -57,11 +57,11 @@ xfs_size_fn(
 
 STATIC int
 xfs_ioinit(
-       struct bhv_vfs          *vfsp,
+       struct xfs_mount        *mp,
        struct xfs_mount_args   *mntargs,
        int                     flags)
 {
-       return xfs_mountfs(vfsp, XFS_VFSTOM(vfsp), flags);
+       return xfs_mountfs(mp, flags);
 }
 
 xfs_ioops_t    xfs_iocore_xfs = {
index 6b1aa7d6f434de063ed28803f9e96985d93c03cc..ba8df2f0dd4fe1beb4568a7117ceaee42ed59fd7 100644 (file)
@@ -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,7 @@ 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_IODONE(mp);
        xfs_mount_free(mp);
        return 0;
 }
@@ -1286,9 +1283,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));
 }
 
index 94f73c523e5ff59aeaa68b2477f08e34e3d4d8e1..7f671f8269b4ddacde42d4bd2f255144e6ed1ac0 100644 (file)
@@ -54,7 +54,6 @@ typedef struct xfs_trans_reservations {
 #else
 struct cred;
 struct log;
-struct bhv_vfs;
 struct xfs_mount_args;
 struct xfs_inode;
 struct xfs_iocore;
@@ -79,13 +78,13 @@ typedef int (*xfs_send_data_t)(int, bhv_vnode_t *,
                        xfs_off_t, size_t, int, bhv_vrwlock_t *);
 typedef int    (*xfs_send_mmap_t)(struct vm_area_struct *, uint);
 typedef int    (*xfs_send_destroy_t)(bhv_vnode_t *, dm_right_t);
-typedef int    (*xfs_send_namesp_t)(dm_eventtype_t, struct bhv_vfs *,
+typedef int    (*xfs_send_namesp_t)(dm_eventtype_t, struct xfs_mount *,
                        bhv_vnode_t *,
                        dm_right_t, bhv_vnode_t *, dm_right_t,
                        char *, char *, mode_t, int, int);
 typedef int    (*xfs_send_mount_t)(struct xfs_mount *, dm_right_t,
                        char *, char *);
-typedef void   (*xfs_send_unmount_t)(struct bhv_vfs *, bhv_vnode_t *,
+typedef void   (*xfs_send_unmount_t)(struct xfs_mount *, bhv_vnode_t *,
                        dm_right_t, mode_t, int, int);
 
 typedef struct xfs_dmops {
@@ -105,12 +104,12 @@ typedef struct xfs_dmops {
        (*(mp)->m_dm_ops->xfs_send_destroy)(vp,right)
 #define XFS_SEND_NAMESP(mp, ev,b1,r1,b2,r2,n1,n2,mode,rval,fl) \
        (*(mp)->m_dm_ops->xfs_send_namesp)(ev,NULL,b1,r1,b2,r2,n1,n2,mode,rval,fl)
-#define XFS_SEND_PREUNMOUNT(mp, vfs,b1,r1,b2,r2,n1,n2,mode,rval,fl) \
-       (*(mp)->m_dm_ops->xfs_send_namesp)(DM_EVENT_PREUNMOUNT,vfs,b1,r1,b2,r2,n1,n2,mode,rval,fl)
+#define XFS_SEND_PREUNMOUNT(mp,b1,r1,b2,r2,n1,n2,mode,rval,fl) \
+       (*(mp)->m_dm_ops->xfs_send_namesp)(DM_EVENT_PREUNMOUNT,mp,b1,r1,b2,r2,n1,n2,mode,rval,fl)
 #define XFS_SEND_MOUNT(mp,right,path,name) \
        (*(mp)->m_dm_ops->xfs_send_mount)(mp,right,path,name)
-#define XFS_SEND_UNMOUNT(mp, vfsp,vp,right,mode,rval,fl) \
-       (*(mp)->m_dm_ops->xfs_send_unmount)(vfsp,vp,right,mode,rval,fl)
+#define XFS_SEND_UNMOUNT(mp, vp,right,mode,rval,fl) \
+       (*(mp)->m_dm_ops->xfs_send_unmount)(mp,vp,right,mode,rval,fl)
 
 
 /*
@@ -202,7 +201,7 @@ typedef struct xfs_qmops {
  * Prototypes and functions for I/O core modularization.
  */
 
-typedef int            (*xfs_ioinit_t)(struct bhv_vfs *,
+typedef int            (*xfs_ioinit_t)(struct xfs_mount *,
                                struct xfs_mount_args *, int);
 typedef int            (*xfs_bmapi_t)(struct xfs_trans *, void *,
                                xfs_fileoff_t, xfs_filblks_t, int,
@@ -232,7 +231,7 @@ typedef void                (*xfs_lock_demote_t)(void *, uint);
 typedef int            (*xfs_lock_nowait_t)(void *, uint);
 typedef void           (*xfs_unlk_t)(void *, unsigned int);
 typedef xfs_fsize_t    (*xfs_size_t)(void *);
-typedef xfs_fsize_t    (*xfs_iodone_t)(struct bhv_vfs *);
+typedef xfs_fsize_t    (*xfs_iodone_t)(struct xfs_mount *);
 typedef int            (*xfs_swap_extents_t)(void *, void *,
                                struct xfs_swapext*);
 
@@ -255,8 +254,8 @@ typedef struct xfs_ioops {
        xfs_swap_extents_t              xfs_swap_extents_func;
 } xfs_ioops_t;
 
-#define XFS_IOINIT(vfsp, args, flags) \
-       (*(mp)->m_io_ops.xfs_ioinit)(vfsp, args, flags)
+#define XFS_IOINIT(mp, args, flags) \
+       (*(mp)->m_io_ops.xfs_ioinit)(mp, args, flags)
 #define XFS_BMAPI(mp, trans,io,bno,len,f,first,tot,mval,nmap,flist,delta) \
        (*(mp)->m_io_ops.xfs_bmapi_func) \
                (trans,(io)->io_obj,bno,len,f,first,tot,mval,nmap,flist,delta)
@@ -290,8 +289,8 @@ typedef struct xfs_ioops {
        (*(mp)->m_io_ops.xfs_ilock_demote)((io)->io_obj, mode)
 #define XFS_SIZE(mp, io) \
        (*(mp)->m_io_ops.xfs_size_func)((io)->io_obj)
-#define XFS_IODONE(vfsp) \
-       (*(mp)->m_io_ops.xfs_iodone)(vfsp)
+#define XFS_IODONE(mp) \
+       (*(mp)->m_io_ops.xfs_iodone)(mp)
 #define XFS_SWAP_EXTENTS(mp, io, tio, sxp) \
        (*(mp)->m_io_ops.xfs_swap_extents_func) \
                ((io)->io_obj, (tio)->io_obj, sxp)
@@ -328,7 +327,7 @@ extern void xfs_icsb_sync_counters_flags(struct xfs_mount *, int);
 #endif
 
 typedef struct xfs_mount {
-       struct bhv_vfs          *m_vfsp;
+       struct super_block      *m_super;
        xfs_tid_t               m_tid;          /* next unused tid for fs */
        AIL_LOCK_T              m_ail_lock;     /* fs AIL mutex */
        xfs_ail_entry_t         m_ail;          /* fs active log item list */
@@ -548,21 +547,6 @@ void xfs_do_force_shutdown(struct xfs_mount *mp, int flags, char *fname,
 /*     XFS_MFSI_CONVERT_SUNIT  */
 #define XFS_MFSI_QUIET         0x40    /* Be silent if mount errors found */
 
-/*
- * Macros for getting from mount to vfs and back.
- */
-#define        XFS_MTOVFS(mp)          xfs_mtovfs(mp)
-static inline struct bhv_vfs *xfs_mtovfs(xfs_mount_t *mp)
-{
-       return mp->m_vfsp;
-}
-
-#define XFS_VFSTOM(vfs) xfs_vfstom(vfs)
-static inline xfs_mount_t *xfs_vfstom(bhv_vfs_t *vfs)
-{
-       return vfs->vfs_mount;
-}
-
 #define XFS_DADDR_TO_AGNO(mp,d)         xfs_daddr_to_agno(mp,d)
 static inline xfs_agnumber_t
 xfs_daddr_to_agno(struct xfs_mount *mp, xfs_daddr_t d)
@@ -633,7 +617,7 @@ extern xfs_mount_t *xfs_mount_init(void);
 extern void    xfs_mod_sb(xfs_trans_t *, __int64_t);
 extern int     xfs_log_sbcount(xfs_mount_t *, uint);
 extern void    xfs_mount_free(xfs_mount_t *mp);
-extern int     xfs_mountfs(struct bhv_vfs *, xfs_mount_t *mp, int);
+extern int     xfs_mountfs(xfs_mount_t *mp, int);
 extern void    xfs_mountfs_check_barriers(xfs_mount_t *mp);
 
 extern int     xfs_unmountfs(xfs_mount_t *, struct cred *);
@@ -651,8 +635,7 @@ extern void xfs_freesb(xfs_mount_t *);
 extern int     xfs_fs_writable(xfs_mount_t *);
 extern int     xfs_syncsub(xfs_mount_t *, int, int *);
 extern int     xfs_sync_inodes(xfs_mount_t *, int, int *);
-extern xfs_agnumber_t  xfs_initialize_perag(struct bhv_vfs *, xfs_mount_t *,
-                                               xfs_agnumber_t);
+extern xfs_agnumber_t  xfs_initialize_perag(xfs_mount_t *, xfs_agnumber_t);
 extern void    xfs_sb_from_disk(struct xfs_sb *, struct xfs_dsb *);
 extern void    xfs_sb_to_disk(struct xfs_dsb *, struct xfs_sb *, __int64_t);
 extern int     xfs_sb_validate_fsb_count(struct xfs_sb *, __uint64_t);
index 668996aae36d5fc97781d3a0011116f171dc075c..8878322ee793ccc524bc6fe07c9969658de6ba21 100644 (file)
@@ -234,7 +234,7 @@ xfs_trans_alloc(
        xfs_mount_t     *mp,
        uint            type)
 {
-       vfs_wait_for_freeze(XFS_MTOVFS(mp), SB_FREEZE_TRANS);
+       xfs_wait_for_freeze(mp, SB_FREEZE_TRANS);
        return _xfs_trans_alloc(mp, type);
 }
 
@@ -628,7 +628,7 @@ xfs_trans_apply_sb_deltas(
                                  offsetof(xfs_dsb_t, sb_frextents) +
                                  sizeof(sbp->sb_frextents) - 1);
 
-       XFS_MTOVFS(tp->t_mountp)->vfs_super->s_dirt = 1;
+       tp->t_mountp->m_super->s_dirt = 1;
 }
 
 /*
index febfd8367e1352a61db4911baab02e0e472af1cb..3bba1a6aba8bd55428494680b49cf7817c842409 100644 (file)
@@ -211,7 +211,6 @@ xfs_cleanup(void)
  */
 STATIC int
 xfs_start_flags(
-       struct bhv_vfs          *vfs,
        struct xfs_mount_args   *ap,
        struct xfs_mount        *mp)
 {
@@ -336,7 +335,6 @@ xfs_start_flags(
  */
 STATIC int
 xfs_finish_flags(
-       struct bhv_vfs          *vfs,
        struct xfs_mount_args   *ap,
        struct xfs_mount        *mp)
 {
@@ -438,11 +436,10 @@ xfs_mount(
        struct xfs_mount_args   *args,
        cred_t                  *credp)
 {
-       struct bhv_vfs          *vfsp = XFS_MTOVFS(mp);
        struct block_device     *ddev, *logdev, *rtdev;
        int                     flags = 0, error;
 
-       ddev = vfsp->vfs_super->s_bdev;
+       ddev = mp->m_super->s_bdev;
        logdev = rtdev = NULL;
 
        error = xfs_dmops_get(mp, args);
@@ -510,13 +507,13 @@ xfs_mount(
        /*
         * Setup flags based on mount(2) options and then the superblock
         */
-       error = xfs_start_flags(vfsp, args, mp);
+       error = xfs_start_flags(args, mp);
        if (error)
                goto error1;
        error = xfs_readsb(mp, flags);
        if (error)
                goto error1;
-       error = xfs_finish_flags(vfsp, args, mp);
+       error = xfs_finish_flags(args, mp);
        if (error)
                goto error2;
 
@@ -547,7 +544,7 @@ xfs_mount(
        if ((error = xfs_filestream_mount(mp)))
                goto error2;
 
-       error = XFS_IOINIT(vfsp, args, flags);
+       error = XFS_IOINIT(mp, args, flags);
        if (error)
                goto error2;
 
@@ -577,7 +574,6 @@ xfs_unmount(
        int             flags,
        cred_t          *credp)
 {
-       bhv_vfs_t       *vfsp = XFS_MTOVFS(mp);
        xfs_inode_t     *rip;
        bhv_vnode_t     *rvp;
        int             unmount_event_wanted = 0;
@@ -590,7 +586,7 @@ xfs_unmount(
 
 #ifdef HAVE_DMAPI
        if (mp->m_flags & XFS_MOUNT_DMAPI) {
-               error = XFS_SEND_PREUNMOUNT(mp, vfsp,
+               error = XFS_SEND_PREUNMOUNT(mp,
                                rvp, DM_RIGHT_NULL, rvp, DM_RIGHT_NULL,
                                NULL, NULL, 0, 0,
                                (mp->m_dmevmask & (1<<DM_EVENT_PREUNMOUNT))?
@@ -647,7 +643,7 @@ out:
                /* Note: mp structure must still exist for
                 * XFS_SEND_UNMOUNT() call.
                 */
-               XFS_SEND_UNMOUNT(mp, vfsp, error == 0 ? rvp : NULL,
+               XFS_SEND_UNMOUNT(mp, error == 0 ? rvp : NULL,
                        DM_RIGHT_NULL, 0, error, unmount_event_flags);
        }
        if (xfs_unmountfs_needed) {