From owner-svn-src-all@FreeBSD.ORG Sun Jun 14 18:04:22 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC6511065670; Sun, 14 Jun 2009 18:04:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9953B8FC18; Sun, 14 Jun 2009 18:04:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5EI4MCR056334; Sun, 14 Jun 2009 18:04:22 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5EI4MOO056333; Sun, 14 Jun 2009 18:04:22 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200906141804.n5EI4MOO056333@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 14 Jun 2009 18:04:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194205 - in stable/7/sys: . contrib/pf dev/ath/ath_hal fs/pseudofs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Jun 2009 18:04:23 -0000 Author: kib Date: Sun Jun 14 18:04:22 2009 New Revision: 194205 URL: http://svn.freebsd.org/changeset/base/194205 Log: MFC r193176: Unlock the pseudofs vnode before calling fill method for pfs_readlink(). Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/fs/pseudofs/pseudofs_vnops.c Modified: stable/7/sys/fs/pseudofs/pseudofs_vnops.c ============================================================================== --- stable/7/sys/fs/pseudofs/pseudofs_vnops.c Sun Jun 14 18:01:35 2009 (r194204) +++ stable/7/sys/fs/pseudofs/pseudofs_vnops.c Sun Jun 14 18:04:22 2009 (r194205) @@ -746,9 +746,10 @@ pfs_readlink(struct vop_readlink_args *v struct pfs_node *pn = pvd->pvd_pn; struct uio *uio = va->a_uio; struct proc *proc = NULL; + struct thread *td = curthread; char buf[PATH_MAX]; struct sbuf sb; - int error; + int error, locked; PFS_TRACE(("%s", pn->pn_name)); pfs_assert_not_owned(pn); @@ -770,14 +771,19 @@ pfs_readlink(struct vop_readlink_args *v _PHOLD(proc); PROC_UNLOCK(proc); } + vhold(vn); + locked = VOP_ISLOCKED(vn, td); + VOP_UNLOCK(vn, 0, td); /* sbuf_new() can't fail with a static buffer */ sbuf_new(&sb, buf, sizeof buf, 0); - error = pn_fill(curthread, proc, pn, &sb, NULL); + error = pn_fill(td, proc, pn, &sb, NULL); if (proc != NULL) PRELE(proc); + vn_lock(vn, locked | LK_RETRY, td); + vdrop(vn); if (error) { sbuf_delete(&sb);