@@ -201,6 +201,10 @@ xfs_defer_create_done(
const struct xfs_defer_op_type *ops = defer_op_types[dfp->dfp_type];
struct xfs_log_item *lip;
+ /* If there is no log intent item, there can be no log done item. */
+ if (!dfp->dfp_intent)
+ return;
+
/*
* Mark the transaction dirty, even on error. This ensures the
* transaction is aborted, which:
@@ -740,9 +740,6 @@ xfs_attr_create_done(
struct xfs_attri_log_item *attrip;
struct xfs_attrd_log_item *attrdp;
- if (!intent)
- return NULL;
-
attrip = ATTRI_ITEM(intent);
attrdp = kmem_cache_zalloc(xfs_attrd_cache, GFP_NOFS | __GFP_NOFAIL);