|
@@ -511,7 +511,14 @@ xfs_attr_shortform_addname(xfs_da_args_t *args)
|
|
if (args->flags & ATTR_CREATE)
|
|
if (args->flags & ATTR_CREATE)
|
|
return retval;
|
|
return retval;
|
|
retval = xfs_attr_shortform_remove(args);
|
|
retval = xfs_attr_shortform_remove(args);
|
|
- ASSERT(retval == 0);
|
|
|
|
|
|
+ if (retval)
|
|
|
|
+ return retval;
|
|
|
|
+ /*
|
|
|
|
+ * Since we have removed the old attr, clear ATTR_REPLACE so
|
|
|
|
+ * that the leaf format add routine won't trip over the attr
|
|
|
|
+ * not being around.
|
|
|
|
+ */
|
|
|
|
+ args->flags &= ~ATTR_REPLACE;
|
|
}
|
|
}
|
|
|
|
|
|
if (args->namelen >= XFS_ATTR_SF_ENTSIZE_MAX ||
|
|
if (args->namelen >= XFS_ATTR_SF_ENTSIZE_MAX ||
|