svn commit: r270204 - head/sys/ufs/ufs
Konstantin Belousov
kib at FreeBSD.org
Wed Aug 20 08:15:24 UTC 2014
Author: kib
Date: Wed Aug 20 08:15:23 2014
New Revision: 270204
URL: http://svnweb.freebsd.org/changeset/base/270204
Log:
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
Modified:
head/sys/ufs/ufs/ufs_vnops.c
Modified: head/sys/ufs/ufs/ufs_vnops.c
==============================================================================
--- head/sys/ufs/ufs/ufs_vnops.c Wed Aug 20 08:13:03 2014 (r270203)
+++ head/sys/ufs/ufs/ufs_vnops.c Wed Aug 20 08:15:23 2014 (r270204)
@@ -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);
}
More information about the svn-src-head
mailing list