mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
The tvp vnode on rename is usually unlinked. Drop the cached null
vnode for tvp to allow the free of the lower vnode, if needed. PR: kern/180236 Tested by: smh Sponsored by: The FreeBSD Foundation MFC after: 1 week
This commit is contained in:
parent
3e01326432
commit
18a8d3d7f8
1 changed files with 6 additions and 1 deletions
|
|
@ -554,6 +554,7 @@ null_rename(struct vop_rename_args *ap)
|
|||
struct vnode *fvp = ap->a_fvp;
|
||||
struct vnode *fdvp = ap->a_fdvp;
|
||||
struct vnode *tvp = ap->a_tvp;
|
||||
struct null_node *tnn;
|
||||
|
||||
/* Check for cross-device rename. */
|
||||
if ((fvp->v_mount != tdvp->v_mount) ||
|
||||
|
|
@ -568,7 +569,11 @@ null_rename(struct vop_rename_args *ap)
|
|||
vrele(fvp);
|
||||
return (EXDEV);
|
||||
}
|
||||
|
||||
|
||||
if (tvp != NULL) {
|
||||
tnn = VTONULL(tvp);
|
||||
tnn->null_flags |= NULLV_DROP;
|
||||
}
|
||||
return (null_bypass((struct vop_generic_args *)ap));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue