diff --git a/module/zfs/zfs_vnops.c b/module/zfs/zfs_vnops.c index d415e8024..7e2413076 100644 --- a/module/zfs/zfs_vnops.c +++ b/module/zfs/zfs_vnops.c @@ -482,8 +482,10 @@ zfs_read(struct inode *ip, uio_t *uio, int ioflag, cred_t *cr) /* * If we're in FRSYNC mode, sync out this znode before reading it. + * Only do this for non-snapshots. */ - if (ioflag & FRSYNC || zfsvfs->z_os->os_sync == ZFS_SYNC_ALWAYS) + if (zfsvfs->z_log && + (ioflag & FRSYNC || zfsvfs->z_os->os_sync == ZFS_SYNC_ALWAYS)) zil_commit(zfsvfs->z_log, zp->z_id); /*