aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_dir2.c
diff options
context:
space:
mode:
authorBrian Foster <bfoster@redhat.com>2018-07-11 22:26:21 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2018-07-11 22:26:21 -0700
commit381eee69f862d38bef468e91517e37fc53f60885 (patch)
treebd94a1f76fbc406f4b468c44b0245e714c42cf3b /fs/xfs/libxfs/xfs_dir2.c
parentxfs: use ->t_firstblock in dir ops (diff)
downloadlinux-dev-381eee69f862d38bef468e91517e37fc53f60885.tar.xz
linux-dev-381eee69f862d38bef468e91517e37fc53f60885.zip
xfs: remove firstblock param from xfs dir ops
All callers of the xfs_dir_*() functions pass ->t_firstblock as the firstblock parameter. Drop the parameter and access ->t_firstblock directly. Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_dir2.c')
-rw-r--r--fs/xfs/libxfs/xfs_dir2.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/fs/xfs/libxfs/xfs_dir2.c b/fs/xfs/libxfs/xfs_dir2.c
index 781dc63d305d..a3983e3eb64a 100644
--- a/fs/xfs/libxfs/xfs_dir2.c
+++ b/fs/xfs/libxfs/xfs_dir2.c
@@ -243,7 +243,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;
@@ -251,7 +250,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);
@@ -274,7 +272,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;
@@ -420,7 +418,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;
@@ -442,7 +439,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;
@@ -481,7 +478,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;
@@ -506,7 +502,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;
@@ -545,7 +541,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);
}
/*