mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
- vput(tvp) before vrele(tdvp) in kern_rename() to avoid lock order issues.
This commit is contained in:
parent
797bb929c6
commit
836c5b4149
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=144898
@ -3261,12 +3261,12 @@ kern_rename(struct thread *td, char *from, char *to, enum uio_seg pathseg)
|
||||
} else {
|
||||
NDFREE(&fromnd, NDF_ONLY_PNBUF);
|
||||
NDFREE(&tond, NDF_ONLY_PNBUF);
|
||||
if (tvp)
|
||||
vput(tvp);
|
||||
if (tdvp == tvp)
|
||||
vrele(tdvp);
|
||||
else
|
||||
vput(tdvp);
|
||||
if (tvp)
|
||||
vput(tvp);
|
||||
vrele(fromnd.ni_dvp);
|
||||
vrele(fvp);
|
||||
}
|
||||
|
@ -3261,12 +3261,12 @@ kern_rename(struct thread *td, char *from, char *to, enum uio_seg pathseg)
|
||||
} else {
|
||||
NDFREE(&fromnd, NDF_ONLY_PNBUF);
|
||||
NDFREE(&tond, NDF_ONLY_PNBUF);
|
||||
if (tvp)
|
||||
vput(tvp);
|
||||
if (tdvp == tvp)
|
||||
vrele(tdvp);
|
||||
else
|
||||
vput(tdvp);
|
||||
if (tvp)
|
||||
vput(tvp);
|
||||
vrele(fromnd.ni_dvp);
|
||||
vrele(fvp);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user