[XFS] the "aendp" arg to xfs_dir2_data_freescan is always NULL, remove it.
[firefly-linux-kernel-4.4.55.git] / fs / xfs / xfs_dir2_leaf.c
index 0f5e2f2ce6ec468afb5e545456b9915908ac482c..db14ea71459f0c8086e00e0d26c40498cf845da8 100644 (file)
 #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"
 #include "xfs_da_btree.h"
 #include "xfs_bmap_btree.h"
 #include "xfs_attr_sf.h"
-#include "xfs_dir_sf.h"
 #include "xfs_dir2_sf.h"
 #include "xfs_dinode.h"
 #include "xfs_inode.h"
@@ -135,8 +133,7 @@ xfs_dir2_block_to_leaf(
         */
        block->hdr.magic = cpu_to_be32(XFS_DIR2_DATA_MAGIC);
        if (needscan)
-               xfs_dir2_data_freescan(mp, (xfs_dir2_data_t *)block, &needlog,
-                       NULL);
+               xfs_dir2_data_freescan(mp, (xfs_dir2_data_t *)block, &needlog);
        /*
         * Set up leaf tail and bests table.
         */
@@ -407,7 +404,7 @@ xfs_dir2_leaf_addname(
         * Initialize our new entry (at last).
         */
        dep = (xfs_dir2_data_entry_t *)dup;
-       INT_SET(dep->inumber, ARCH_CONVERT, args->inumber);
+       dep->inumber = cpu_to_be64(args->inumber);
        dep->namelen = args->namelen;
        memcpy(dep->name, args->name, dep->namelen);
        tagp = XFS_DIR2_DATA_ENTRY_TAG_P(dep);
@@ -416,7 +413,7 @@ xfs_dir2_leaf_addname(
         * Need to scan fix up the bestfree table.
         */
        if (needscan)
-               xfs_dir2_data_freescan(mp, data, &needlog, NULL);
+               xfs_dir2_data_freescan(mp, data, &needlog);
        /*
         * Need to log the data block's header.
         */
@@ -884,7 +881,7 @@ xfs_dir2_leaf_getdents(
                                        XFS_DIR2_BYTE_TO_DA(mp,
                                                XFS_DIR2_LEAF_OFFSET) - map_off,
                                        XFS_BMAPI_METADATA, NULL, 0,
-                                       &map[map_valid], &nmap, NULL);
+                                       &map[map_valid], &nmap, NULL, NULL);
                                /*
                                 * Don't know if we should ignore this or
                                 * try to return an error.
@@ -1098,7 +1095,7 @@ xfs_dir2_leaf_getdents(
 
                p->cook = XFS_DIR2_BYTE_TO_DATAPTR(mp, curoff + length);
 
-               p->ino = INT_GET(dep->inumber, ARCH_CONVERT);
+               p->ino = be64_to_cpu(dep->inumber);
 #if XFS_BIG_INUMS
                p->ino += mp->m_inoadd;
 #endif
@@ -1319,7 +1316,7 @@ xfs_dir2_leaf_lookup(
        /*
         * Return the found inode number.
         */
-       args->inumber = INT_GET(dep->inumber, ARCH_CONVERT);
+       args->inumber = be64_to_cpu(dep->inumber);
        xfs_da_brelse(tp, dbp);
        xfs_da_brelse(tp, lbp);
        return XFS_ERROR(EEXIST);
@@ -1498,7 +1495,7 @@ xfs_dir2_leaf_removename(
         * log the data block header if necessary.
         */
        if (needscan)
-               xfs_dir2_data_freescan(mp, data, &needlog, NULL);
+               xfs_dir2_data_freescan(mp, data, &needlog);
        if (needlog)
                xfs_dir2_data_log_header(tp, dbp);
        /*
@@ -1606,11 +1603,11 @@ xfs_dir2_leaf_replace(
        dep = (xfs_dir2_data_entry_t *)
              ((char *)dbp->data +
               XFS_DIR2_DATAPTR_TO_OFF(dp->i_mount, be32_to_cpu(lep->address)));
-       ASSERT(args->inumber != INT_GET(dep->inumber, ARCH_CONVERT));
+       ASSERT(args->inumber != be64_to_cpu(dep->inumber));
        /*
         * Put the new inode number in, log it.
         */
-       INT_SET(dep->inumber, ARCH_CONVERT, args->inumber);
+       dep->inumber = cpu_to_be64(args->inumber);
        tp = args->trans;
        xfs_dir2_data_log_entry(tp, dbp, dep);
        xfs_da_buf_done(dbp);