diff options
-rw-r--r-- | module/zfs/zfs_fm.c | 16 | ||||
-rw-r--r-- | module/zfs/zfs_vnops.c | 3 |
2 files changed, 8 insertions, 11 deletions
diff --git a/module/zfs/zfs_fm.c b/module/zfs/zfs_fm.c index df37fed2b..d2f456d17 100644 --- a/module/zfs/zfs_fm.c +++ b/module/zfs/zfs_fm.c @@ -272,15 +272,13 @@ zfs_ereport_start(nvlist_t **ereport_out, nvlist_t **detector_out, FM_EREPORT_PAYLOAD_ZFS_POOL_CONTEXT, DATA_TYPE_INT32, spa_load_state(spa), NULL); - if (spa != NULL) { - fm_payload_set(ereport, FM_EREPORT_PAYLOAD_ZFS_POOL_FAILMODE, - DATA_TYPE_STRING, - spa_get_failmode(spa) == ZIO_FAILURE_MODE_WAIT ? - FM_EREPORT_FAILMODE_WAIT : - spa_get_failmode(spa) == ZIO_FAILURE_MODE_CONTINUE ? - FM_EREPORT_FAILMODE_CONTINUE : FM_EREPORT_FAILMODE_PANIC, - NULL); - } + fm_payload_set(ereport, FM_EREPORT_PAYLOAD_ZFS_POOL_FAILMODE, + DATA_TYPE_STRING, + spa_get_failmode(spa) == ZIO_FAILURE_MODE_WAIT ? + FM_EREPORT_FAILMODE_WAIT : + spa_get_failmode(spa) == ZIO_FAILURE_MODE_CONTINUE ? + FM_EREPORT_FAILMODE_CONTINUE : FM_EREPORT_FAILMODE_PANIC, + NULL); if (vd != NULL) { vdev_t *pvd = vd->vdev_parent; diff --git a/module/zfs/zfs_vnops.c b/module/zfs/zfs_vnops.c index 6b5cda958..4a0f20166 100644 --- a/module/zfs/zfs_vnops.c +++ b/module/zfs/zfs_vnops.c @@ -4256,8 +4256,7 @@ zfs_putpage(struct inode *ip, struct page *pp, struct writeback_control *wbc) * writepages() normally handles the entire commit for * performance reasons. */ - if (zsb->z_log != NULL) - zil_commit(zsb->z_log, zp->z_id); + zil_commit(zsb->z_log, zp->z_id); } ZFS_EXIT(zsb); |