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:
parent
aa7817c151
commit
7b86ad215e
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue