]> err.no Git - linux-2.6/blobdiff - fs/xfs/xfs_vfsops.c
[PATCH] proc: Replace proc_inode.type with proc_inode.fd
[linux-2.6] / fs / xfs / xfs_vfsops.c
index 57ee2bebd2484882ced1ae08b9b7b2f84cd9fb9f..6c96391f3f1aad091982840e85e13d107757f461 100644 (file)
@@ -24,7 +24,6 @@
 #include "xfs_trans.h"
 #include "xfs_sb.h"
 #include "xfs_ag.h"
-#include "xfs_dir.h"
 #include "xfs_dir2.h"
 #include "xfs_dmapi.h"
 #include "xfs_mount.h"
@@ -32,7 +31,6 @@
 #include "xfs_bmap_btree.h"
 #include "xfs_ialloc_btree.h"
 #include "xfs_alloc_btree.h"
-#include "xfs_dir_sf.h"
 #include "xfs_dir2_sf.h"
 #include "xfs_attr_sf.h"
 #include "xfs_dinode.h"
@@ -131,9 +129,6 @@ xfs_init(void)
 #ifdef XFS_BMBT_TRACE
        xfs_bmbt_trace_buf = ktrace_alloc(XFS_BMBT_TRACE_SIZE, KM_SLEEP);
 #endif
-#ifdef XFS_DIR_TRACE
-       xfs_dir_trace_buf = ktrace_alloc(XFS_DIR_TRACE_SIZE, KM_SLEEP);
-#endif
 #ifdef XFS_ATTR_TRACE
        xfs_attr_trace_buf = ktrace_alloc(XFS_ATTR_TRACE_SIZE, KM_SLEEP);
 #endif
@@ -177,9 +172,6 @@ xfs_cleanup(void)
 #ifdef XFS_ATTR_TRACE
        ktrace_free(xfs_attr_trace_buf);
 #endif
-#ifdef XFS_DIR_TRACE
-       ktrace_free(xfs_dir_trace_buf);
-#endif
 #ifdef XFS_BMBT_TRACE
        ktrace_free(xfs_bmbt_trace_buf);
 #endif
@@ -555,7 +547,7 @@ xfs_unmount(
        bhv_vfs_t       *vfsp = bhvtovfs(bdp);
        xfs_mount_t     *mp = XFS_BHVTOM(bdp);
        xfs_inode_t     *rip;
-       vnode_t         *rvp;
+       bhv_vnode_t     *rvp;
        int             unmount_event_wanted = 0;
        int             unmount_event_flags = 0;
        int             xfs_unmountfs_needed = 0;
@@ -701,7 +693,7 @@ xfs_unmount_flush(
        xfs_inode_t     *rip = mp->m_rootip;
        xfs_inode_t     *rbmip;
        xfs_inode_t     *rsumip = NULL;
-       vnode_t         *rvp = XFS_ITOV(rip);
+       bhv_vnode_t     *rvp = XFS_ITOV(rip);
        int             error;
 
        xfs_ilock(rip, XFS_ILOCK_EXCL);
@@ -780,9 +772,9 @@ fscorrupt_out2:
 STATIC int
 xfs_root(
        bhv_desc_t      *bdp,
-       vnode_t         **vpp)
+       bhv_vnode_t     **vpp)
 {
-       vnode_t         *vp;
+       bhv_vnode_t     *vp;
 
        vp = XFS_ITOV((XFS_BHVTOM(bdp))->m_rootip);
        VN_HOLD(vp);
@@ -800,8 +792,8 @@ xfs_root(
 STATIC int
 xfs_statvfs(
        bhv_desc_t      *bdp,
-       xfs_statfs_t    *statp,
-       vnode_t         *vp)
+       bhv_statvfs_t   *statp,
+       bhv_vnode_t     *vp)
 {
        __uint64_t      fakeinos;
        xfs_extlen_t    lsize;
@@ -916,7 +908,7 @@ xfs_sync_inodes(
        xfs_inode_t     *ip = NULL;
        xfs_inode_t     *ip_next;
        xfs_buf_t       *bp;
-       vnode_t         *vp = NULL;
+       bhv_vnode_t     *vp = NULL;
        int             error;
        int             last_error;
        uint64_t        fflag;
@@ -1155,9 +1147,9 @@ xfs_sync_inodes(
                        xfs_iunlock(ip, XFS_ILOCK_SHARED);
 
                        if (XFS_FORCED_SHUTDOWN(mp)) {
-                               VOP_TOSS_PAGES(vp, 0, -1, FI_REMAPF);
+                               bhv_vop_toss_pages(vp, 0, -1, FI_REMAPF);
                        } else {
-                               VOP_FLUSHINVAL_PAGES(vp, 0, -1, FI_REMAPF);
+                               bhv_vop_flushinval_pages(vp, 0, -1, FI_REMAPF);
                        }
 
                        xfs_ilock(ip, XFS_ILOCK_SHARED);
@@ -1177,8 +1169,8 @@ xfs_sync_inodes(
                                 * across calls to the buffer cache.
                                 */
                                xfs_iunlock(ip, XFS_ILOCK_SHARED);
-                               VOP_FLUSH_PAGES(vp, (xfs_off_t)0, -1,
-                                                       fflag, FI_NONE, error);
+                               error = bhv_vop_flush_pages(vp, (xfs_off_t)0,
+                                                       -1, fflag, FI_NONE);
                                xfs_ilock(ip, XFS_ILOCK_SHARED);
                        }
 
@@ -1230,9 +1222,7 @@ xfs_sync_inodes(
                                                 * marker and free it.
                                                 */
                                                XFS_MOUNT_ILOCK(mp);
-
                                                IPOINTER_REMOVE(ip, mp);
-
                                                XFS_MOUNT_IUNLOCK(mp);
 
                                                ASSERT(!(lock_flags &
@@ -1573,7 +1563,7 @@ xfs_syncsub(
 STATIC int
 xfs_vget(
        bhv_desc_t      *bdp,
-       vnode_t         **vpp,
+       bhv_vnode_t     **vpp,
        fid_t           *fidp)
 {
        xfs_mount_t     *mp = XFS_BHVTOM(bdp);
@@ -1656,10 +1646,10 @@ xfs_vget(
 #define MNTOPT_NOATTR2 "noattr2"       /* do not use attr2 attribute format */
 
 STATIC unsigned long
-suffix_strtoul(const char *cp, char **endp, unsigned int base)
+suffix_strtoul(char *s, char **endp, unsigned int base)
 {
        int     last, shift_left_factor = 0;
-       char    *value = (char *)cp;
+       char    *value = s;
 
        last = strlen(value) - 1;
        if (value[last] == 'K' || value[last] == 'k') {
@@ -1675,7 +1665,7 @@ suffix_strtoul(const char *cp, char **endp, unsigned int base)
                value[last] = '\0';
        }
 
-       return simple_strtoul(cp, endp, base) << shift_left_factor;
+       return simple_strtoul((const char *)s, endp, base) << shift_left_factor;
 }
 
 STATIC int