diff --git a/include/sys/zfs_znode.h b/include/sys/zfs_znode.h index 4bb8a77617..a6b82d574f 100644 --- a/include/sys/zfs_znode.h +++ b/include/sys/zfs_znode.h @@ -263,7 +263,6 @@ typedef struct znode { #define ZFS_EXIT(zsb) \ { \ rrw_exit(&(zsb)->z_teardown_lock, FTAG); \ - tsd_exit(); \ } /* Verifies the znode is valid */ diff --git a/module/zfs/zfs_vnops.c b/module/zfs/zfs_vnops.c index 723d6210f2..5ce8a1e98c 100644 --- a/module/zfs/zfs_vnops.c +++ b/module/zfs/zfs_vnops.c @@ -2156,6 +2156,8 @@ zfs_fsync(struct inode *ip, int syncflag, cred_t *cr) zil_commit(zsb->z_log, zp->z_id); ZFS_EXIT(zsb); } + tsd_set(zfs_fsyncer_key, NULL); + return (0); } EXPORT_SYMBOL(zfs_fsync);