aboutsummaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_attr.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman2018-05-08 09:47:16 +0200
committerGreg Kroah-Hartman2018-05-08 09:47:16 +0200
commit58318cd4df415aaeaad1a7306cf1d35dad9a21c3 (patch)
tree794fef2338813360e0f535511f7d6f97a08254f0 /fs/xfs/libxfs/xfs_attr.c
parentdcadfaf2127e067e87843ff688f4ae5674a8d607 (diff)
parent75bc37fefc4471e718ba8e651aa74673d4e0a9eb (diff)
Merge 4.17-rc4 into usb-next
We want the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/xfs/libxfs/xfs_attr.c')
-rw-r--r--fs/xfs/libxfs/xfs_attr.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_attr.c b/fs/xfs/libxfs/xfs_attr.c
index ce4a34a2751d..35a124400d60 100644
--- a/fs/xfs/libxfs/xfs_attr.c
+++ b/fs/xfs/libxfs/xfs_attr.c
@@ -511,7 +511,14 @@ xfs_attr_shortform_addname(xfs_da_args_t *args)
if (args->flags & ATTR_CREATE)
return retval;
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 ||