diff options
Diffstat (limited to 'fs/xfs/libxfs/xfs_dir2.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_dir2.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/fs/xfs/libxfs/xfs_dir2.c b/fs/xfs/libxfs/xfs_dir2.c index 59169aff30fe..c98250f0de50 100644 --- a/fs/xfs/libxfs/xfs_dir2.c +++ b/fs/xfs/libxfs/xfs_dir2.c @@ -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); } /* |