vn_path_to_global_path_hardlink(): initialize len

before calling vn_fullpath_hardlink().  Otherwise we get random failures
when the len is automatically clipped.

Reported and tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
This commit is contained in:
Konstantin Belousov 2023-07-04 10:46:15 +03:00
parent 911f026039
commit d7614c010c

View File

@ -3861,6 +3861,7 @@ vn_path_to_global_path_hardlink(struct thread *td, struct vnode *vp,
* name.
*/
VOP_UNLOCK(vp);
len = pathlen;
error = vn_fullpath_hardlink(vp, dvp, leaf_name, leaf_length,
&rpath, &fbuf, &len);