diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c index 52eb6cef2b50..0fc6a4ef6961 100644 --- a/sys/kern/vfs_extattr.c +++ b/sys/kern/vfs_extattr.c @@ -3266,7 +3266,7 @@ kern_rename(struct thread *td, char *from, char *to, enum uio_seg pathseg) vrele(fvp); goto out1; } - tvfslocked = NDHASGIANT(&fromnd); + tvfslocked = NDHASGIANT(&tond); tdvp = tond.ni_dvp; tvp = tond.ni_vp; if (tvp != NULL) { diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 52eb6cef2b50..0fc6a4ef6961 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -3266,7 +3266,7 @@ kern_rename(struct thread *td, char *from, char *to, enum uio_seg pathseg) vrele(fvp); goto out1; } - tvfslocked = NDHASGIANT(&fromnd); + tvfslocked = NDHASGIANT(&tond); tdvp = tond.ni_dvp; tvp = tond.ni_vp; if (tvp != NULL) {