mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 19:34:43 +01:00
Do not busy the UFS mount point inside VOP_RENAME(). The
kern_renameat() already starts write on the mp, which prevents parallel unmount from proceed. Busying mp after vn_start_write() deadlocks the unmount. Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week
This commit is contained in:
1 parent
4ce90426e0
commit
29d03af1e4
1 file changed
-9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=270204
@@ -1141,11 +1141,6 @@ ufs_rename(ap)
|
||||
mp = NULL;
|
||||
goto releout;
|
||||
}
|
||||
error = vfs_busy(mp, 0);
|
||||
if (error) {
|
||||
mp = NULL;
|
||||
goto releout;
|
||||
}
|
||||
relock:
|
||||
/*
|
||||
* We need to acquire 2 to 4 locks depending on whether tvp is NULL
|
||||
@@ -1545,8 +1540,6 @@ unlockout:
|
||||
if (error == 0 && tdp->i_flag & IN_NEEDSYNC)
|
||||
error = VOP_FSYNC(tdvp, MNT_WAIT, td);
|
||||
vput(tdvp);
|
||||
if (mp)
|
||||
vfs_unbusy(mp);
|
||||
return (error);
|
||||
|
||||
bad:
|
||||
@@ -1564,8 +1557,6 @@ releout:
|
||||
vrele(tdvp);
|
||||
if (tvp)
|
||||
vrele(tvp);
|
||||
if (mp)
|
||||
vfs_unbusy(mp);
|
||||
|
||||
return (error);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user