From owner-svn-src-head@FreeBSD.ORG Wed Aug 20 08:15:24 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3B5E3742; Wed, 20 Aug 2014 08:15:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 26DFC3CCA; Wed, 20 Aug 2014 08:15:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7K8FN7H064602; Wed, 20 Aug 2014 08:15:23 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7K8FNHe064601; Wed, 20 Aug 2014 08:15:23 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201408200815.s7K8FNHe064601@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 20 Aug 2014 08:15:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270204 - head/sys/ufs/ufs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2014 08:15:24 -0000 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); }