mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
ffs_syncvnode(): avoid a LoR for SU
There is another case where SU code does ffs_syncvnode(dvp) for the parent directory dvp while the child vnode vp is locked. Avoid the issue by relocking and returning ERELOOKUP to indicate the need of resync. Reported by: jkim Reviewed by: mckusick Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D37997
This commit is contained in:
parent
1d9f3a37eb
commit
6e1eabadcb
|
@ -12758,9 +12758,15 @@ softdep_fsync(
|
|||
pagedep_new_block = pagedep->pd_state & NEWBLOCK;
|
||||
FREE_LOCK(ump);
|
||||
locked = 0;
|
||||
if (pagedep_new_block && (error =
|
||||
ffs_syncvnode(pvp, MNT_WAIT, 0))) {
|
||||
if (pagedep_new_block) {
|
||||
VOP_UNLOCK(vp);
|
||||
error = ffs_syncvnode(pvp,
|
||||
MNT_WAIT, 0);
|
||||
if (error == 0)
|
||||
error = ERELOOKUP;
|
||||
vput(pvp);
|
||||
vn_lock(vp, LK_EXCLUSIVE |
|
||||
LK_RETRY);
|
||||
return (error);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue