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 GitHub
parent 5bed68bdc4
commit 3c7566cb0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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