diff --git a/fs/xfs/xfs_healthmon.c b/fs/xfs/xfs_healthmon.c index 78c87761ac89..b57fa033cec4 100644 --- a/fs/xfs/xfs_healthmon.c +++ b/fs/xfs/xfs_healthmon.c @@ -326,8 +326,10 @@ xfs_healthmon_clear_lost_prev( if (hm->events < XFS_HEALTHMON_MAX_EVENTS) event = kmemdup(&lost_event, sizeof(struct xfs_healthmon_event), GFP_NOFS); - if (!event) + if (!event) { + xfs_healthmon_bump_lost(hm); return -ENOMEM; + } __xfs_healthmon_insert(hm, INSERT_TAIL, event); cleared: