From 3c7566cb0dce96e612fd14b69b66726b4522da09 Mon Sep 17 00:00:00 2001 From: Ryan Moeller Date: Thu, 17 Sep 2020 13:54:14 -0400 Subject: [PATCH] FreeBSD: Do not copy vp into f_data for DTYPE_VNODE files https://reviews.freebsd.org/D26346 Do not copy vp into f_data for DTYPE_VNODE files. The vnode pointer is already stored in f_vnode. Use that so f_data can be reused. Reviewed-by: Brian Behlendorf Signed-off-by: Ryan Moeller Closes #10929 --- module/os/freebsd/zfs/zfs_file_os.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/module/os/freebsd/zfs/zfs_file_os.c b/module/os/freebsd/zfs/zfs_file_os.c index ec7c04717..d7786d513 100644 --- a/module/os/freebsd/zfs/zfs_file_os.c +++ b/module/os/freebsd/zfs/zfs_file_os.c @@ -234,13 +234,10 @@ drop: int zfs_file_fsync(zfs_file_t *fp, int flags) { - struct vnode *v; - if (fp->f_type != DTYPE_VNODE) return (EINVAL); - v = fp->f_data; - return (zfs_vop_fsync(v)); + return (zfs_vop_fsync(fp->f_vnode)); } int