xfs: remove dfops param from high level dirname calls
All callers of the directory create, rename and remove interfaces already associate the dfops with the transaction. Drop the dfops parameters in these calls in preparation for further cleanups in the layers below. This patch does not change behavior. 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>
This commit is contained in:

committed by
Darrick J. Wong

parent
0e0417f3e5
commit
c9cfdb3811
@@ -244,7 +244,6 @@ xfs_dir_createname(
|
||||
struct xfs_name *name,
|
||||
xfs_ino_t inum, /* new entry inode number */
|
||||
xfs_fsblock_t *first, /* bmap's firstblock */
|
||||
struct xfs_defer_ops *dfops, /* bmap's freeblock list */
|
||||
xfs_extlen_t total) /* bmap's total block count */
|
||||
{
|
||||
struct xfs_da_args *args;
|
||||
@@ -252,6 +251,8 @@ 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);
|
||||
if (rval)
|
||||
@@ -270,11 +271,11 @@ xfs_dir_createname(
|
||||
args->hashval = dp->i_mount->m_dirnameops->hashname(name);
|
||||
args->inumber = inum;
|
||||
args->dp = dp;
|
||||
args->firstblock = first;
|
||||
args->dfops = dfops;
|
||||
args->total = total;
|
||||
args->whichfork = XFS_DATA_FORK;
|
||||
args->trans = tp;
|
||||
args->dfops = tp->t_dfops;
|
||||
args->firstblock = first;
|
||||
args->op_flags = XFS_DA_OP_ADDNAME | XFS_DA_OP_OKNOENT;
|
||||
if (!inum)
|
||||
args->op_flags |= XFS_DA_OP_JUSTCHECK;
|
||||
@@ -421,7 +422,6 @@ xfs_dir_removename(
|
||||
struct xfs_name *name,
|
||||
xfs_ino_t ino,
|
||||
xfs_fsblock_t *first, /* bmap's firstblock */
|
||||
struct xfs_defer_ops *dfops, /* bmap's freeblock list */
|
||||
xfs_extlen_t total) /* bmap's total block count */
|
||||
{
|
||||
struct xfs_da_args *args;
|
||||
@@ -429,6 +429,7 @@ xfs_dir_removename(
|
||||
int v; /* type-checking value */
|
||||
|
||||
ASSERT(S_ISDIR(VFS_I(dp)->i_mode));
|
||||
ASSERT(tp->t_dfops);
|
||||
XFS_STATS_INC(dp->i_mount, xs_dir_remove);
|
||||
|
||||
args = kmem_zalloc(sizeof(*args), KM_SLEEP | KM_NOFS);
|
||||
@@ -443,10 +444,10 @@ xfs_dir_removename(
|
||||
args->inumber = ino;
|
||||
args->dp = dp;
|
||||
args->firstblock = first;
|
||||
args->dfops = dfops;
|
||||
args->total = total;
|
||||
args->whichfork = XFS_DATA_FORK;
|
||||
args->trans = tp;
|
||||
args->dfops = tp->t_dfops;
|
||||
|
||||
if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL) {
|
||||
rval = xfs_dir2_sf_removename(args);
|
||||
@@ -483,7 +484,6 @@ xfs_dir_replace(
|
||||
struct xfs_name *name, /* name of entry to replace */
|
||||
xfs_ino_t inum, /* new inode number */
|
||||
xfs_fsblock_t *first, /* bmap's firstblock */
|
||||
struct xfs_defer_ops *dfops, /* bmap's freeblock list */
|
||||
xfs_extlen_t total) /* bmap's total block count */
|
||||
{
|
||||
struct xfs_da_args *args;
|
||||
@@ -491,6 +491,7 @@ xfs_dir_replace(
|
||||
int v; /* type-checking value */
|
||||
|
||||
ASSERT(S_ISDIR(VFS_I(dp)->i_mode));
|
||||
ASSERT(tp->t_dfops);
|
||||
|
||||
rval = xfs_dir_ino_validate(tp->t_mountp, inum);
|
||||
if (rval)
|
||||
@@ -508,10 +509,10 @@ xfs_dir_replace(
|
||||
args->inumber = inum;
|
||||
args->dp = dp;
|
||||
args->firstblock = first;
|
||||
args->dfops = dfops;
|
||||
args->total = total;
|
||||
args->whichfork = XFS_DATA_FORK;
|
||||
args->trans = tp;
|
||||
args->dfops = tp->t_dfops;
|
||||
|
||||
if (dp->i_d.di_format == XFS_DINODE_FMT_LOCAL) {
|
||||
rval = xfs_dir2_sf_replace(args);
|
||||
@@ -547,7 +548,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, NULL, 0);
|
||||
return xfs_dir_createname(tp, dp, name, 0, NULL, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user