One pre-check in zfs_ereport_start() was being called after
the nvlists were being allocated. This simply corrects that
issue.
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #6140
(vd->vdev_remove_wanted || vd->vdev_state == VDEV_STATE_REMOVED))
return;
+ if ((strcmp(subclass, FM_EREPORT_ZFS_DELAY) == 0) &&
+ (zio != NULL) && (!zio->io_timestamp)) {
+ /* Ignore bogus delay events */
+ return;
+ }
+
if ((ereport = fm_nvlist_create(NULL)) == NULL)
return;
return;
}
- if ((strcmp(subclass, FM_EREPORT_ZFS_DELAY) == 0) &&
- (zio != NULL) && (!zio->io_timestamp)) {
- /* Ignore bogus delay events */
- return;
- }
-
/*
* Serialize ereport generation
*/