Date: Wed, 20 Aug 2014 08:15:23 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270204 - head/sys/ufs/ufs Message-ID: <201408200815.s7K8FNHe064601@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201408200815.s7K8FNHe064601>