@@ -944,7 +944,7 @@ xfs_attr_defer_replace(
}
/* Removes an attribute for an inode as a deferred operation */
-static int
+int
xfs_attr_defer_remove(
struct xfs_da_args *args)
{
@@ -545,6 +545,7 @@ bool xfs_attr_is_leaf(struct xfs_inode *ip);
int xfs_attr_get_ilocked(struct xfs_da_args *args);
int xfs_attr_get(struct xfs_da_args *args);
int xfs_attr_defer_add(struct xfs_da_args *args);
+int xfs_attr_defer_remove(struct xfs_da_args *args);
int xfs_attr_set(struct xfs_da_args *args);
int xfs_attr_set_iter(struct xfs_attr_intent *attr);
int xfs_attr_remove_iter(struct xfs_attr_intent *attr);
@@ -126,6 +126,23 @@ xfs_parent_defer_add(
return xfs_attr_defer_add(args);
}
+int
+xfs_parent_defer_remove(
+ struct xfs_trans *tp,
+ struct xfs_inode *dp,
+ struct xfs_parent_defer *parent,
+ xfs_dir2_dataptr_t diroffset,
+ struct xfs_inode *child)
+{
+ struct xfs_da_args *args = &parent->args;
+
+ xfs_init_parent_name_rec(&parent->rec, dp, diroffset);
+ args->trans = tp;
+ args->dp = child;
+ args->hashval = xfs_da_hashname(args->name, args->namelen);
+ return xfs_attr_defer_remove(args);
+}
+
void
xfs_parent_cancel(
xfs_mount_t *mp,
@@ -27,6 +27,10 @@ int xfs_parent_init(xfs_mount_t *mp, struct xfs_parent_defer **parentp);
int xfs_parent_defer_add(struct xfs_trans *tp, struct xfs_parent_defer *parent,
struct xfs_inode *dp, struct xfs_name *parent_name,
xfs_dir2_dataptr_t diroffset, struct xfs_inode *child);
+int xfs_parent_defer_remove(struct xfs_trans *tp, struct xfs_inode *dp,
+ struct xfs_parent_defer *parent,
+ xfs_dir2_dataptr_t diroffset,
+ struct xfs_inode *child);
void xfs_parent_cancel(xfs_mount_t *mp, struct xfs_parent_defer *parent);
unsigned int xfs_pptr_calc_space_res(struct xfs_mount *mp,
unsigned int namelen);