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 <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #10929
This commit is contained in:
Ryan Moeller 2020-09-17 13:54:14 -04:00 committed by Brian Behlendorf
parent aa7817c151
commit 7b86ad215e
1 changed files with 1 additions and 4 deletions

View File

@ -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