]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blobdiff - libxfs/xfs_dir2.c
xfs: remove firstblock param from xfs dir ops
[thirdparty/xfsprogs-dev.git] / libxfs / xfs_dir2.c
index 26a933e8d632adfcf46cdc0a76ae1893be35fab6..aff28ed44174fd478326039f9f49964f4d61720e 100644 (file)
@@ -241,7 +241,6 @@ xfs_dir_createname(
        struct xfs_inode        *dp,
        struct xfs_name         *name,
        xfs_ino_t               inum,           /* new entry inode number */
-       xfs_fsblock_t           *first,         /* bmap's firstblock */
        xfs_extlen_t            total)          /* bmap's total block count */
 {
        struct xfs_da_args      *args;
@@ -249,7 +248,6 @@ xfs_dir_createname(
        int                     v;              /* type-checking value */
 
        ASSERT(S_ISDIR(VFS_I(dp)->i_mode));
-       ASSERT(tp->t_dfops || !first);
 
        if (inum) {
                rval = xfs_dir_ino_validate(tp->t_mountp, inum);
@@ -272,7 +270,7 @@ xfs_dir_createname(
        args->total = total;
        args->whichfork = XFS_DATA_FORK;
        args->trans = tp;
-       args->firstblock = first;
+       args->firstblock = &tp->t_firstblock;
        args->op_flags = XFS_DA_OP_ADDNAME | XFS_DA_OP_OKNOENT;
        if (!inum)
                args->op_flags |= XFS_DA_OP_JUSTCHECK;
@@ -418,7 +416,6 @@ xfs_dir_removename(
        struct xfs_inode        *dp,
        struct xfs_name         *name,
        xfs_ino_t               ino,
-       xfs_fsblock_t           *first,         /* bmap's firstblock */
        xfs_extlen_t            total)          /* bmap's total block count */
 {
        struct xfs_da_args      *args;
@@ -440,7 +437,7 @@ xfs_dir_removename(
        args->hashval = dp->i_mount->m_dirnameops->hashname(name);
        args->inumber = ino;
        args->dp = dp;
-       args->firstblock = first;
+       args->firstblock = &tp->t_firstblock;
        args->total = total;
        args->whichfork = XFS_DATA_FORK;
        args->trans = tp;
@@ -479,7 +476,6 @@ xfs_dir_replace(
        struct xfs_inode        *dp,
        struct xfs_name         *name,          /* name of entry to replace */
        xfs_ino_t               inum,           /* new inode number */
-       xfs_fsblock_t           *first,         /* bmap's firstblock */
        xfs_extlen_t            total)          /* bmap's total block count */
 {
        struct xfs_da_args      *args;
@@ -504,7 +500,7 @@ xfs_dir_replace(
        args->hashval = dp->i_mount->m_dirnameops->hashname(name);
        args->inumber = inum;
        args->dp = dp;
-       args->firstblock = first;
+       args->firstblock = &tp->t_firstblock;
        args->total = total;
        args->whichfork = XFS_DATA_FORK;
        args->trans = tp;
@@ -543,7 +539,7 @@ xfs_dir_canenter(
        xfs_inode_t     *dp,
        struct xfs_name *name)          /* name of entry to add */
 {
-       return xfs_dir_createname(tp, dp, name, 0, NULL, 0);
+       return xfs_dir_createname(tp, dp, name, 0, 0);
 }
 
 /*