- Correct a typo in kern_rename. tvfslocked should be initialized from

tond and not fromnd.  This could lead us to leak Giant, or unlock it
   twice, depending on the filesystems involved.  renames within a single
   filesystem would not have caused any problems.

Sponsored by:	Isilon Systems, Inc.
This commit is contained in:
Jeff Roberson 2005-02-02 17:17:15 +00:00
parent f2ccd228d1
commit ff05fd5d77
2 changed files with 2 additions and 2 deletions

View File

@ -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) {

View File

@ -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) {