diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c index 95257f970e71..46935429ae15 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c @@ -3956,7 +3956,7 @@ zfs_rename(vnode_t *sdvp, vnode_t **svpp, struct componentname *scnp, VOP_UNLOCK(sdvp, 0); out: /* original two vnodes are locked */ - if (zfsvfs->z_os->os_sync == ZFS_SYNC_ALWAYS && error == 0) + if (error == 0 && zfsvfs->z_os->os_sync == ZFS_SYNC_ALWAYS) zil_commit(zilog, 0); if (*tvpp != NULL)