From owner-svn-src-all@FreeBSD.ORG Fri May 17 20:03:56 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3D06CC4C; Fri, 17 May 2013 20:03:56 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2FB64304; Fri, 17 May 2013 20:03:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r4HK3uC7000572; Fri, 17 May 2013 20:03:56 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r4HK3unt000571; Fri, 17 May 2013 20:03:56 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201305172003.r4HK3unt000571@svn.freebsd.org> From: Attilio Rao Date: Fri, 17 May 2013 20:03:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r250751 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 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: Fri, 17 May 2013 20:03:56 -0000 Author: attilio Date: Fri May 17 20:03:55 2013 New Revision: 250751 URL: http://svnweb.freebsd.org/changeset/base/250751 Log: Use readlocking now that assertions on vm_page_lookup() are relaxed. Sponsored by: EMC / Isilon storage division Reviewed by: alc Tested by: flo, pho Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Fri May 17 19:37:16 2013 (r250750) +++ head/sys/kern/vfs_bio.c Fri May 17 20:03:55 2013 (r250751) @@ -2772,7 +2772,7 @@ inmem(struct vnode * vp, daddr_t blkno) size = vp->v_mount->mnt_stat.f_iosize; off = (vm_ooffset_t)blkno * (vm_ooffset_t)vp->v_mount->mnt_stat.f_iosize; - VM_OBJECT_WLOCK(obj); + VM_OBJECT_RLOCK(obj); for (toff = 0; toff < vp->v_mount->mnt_stat.f_iosize; toff += tinc) { m = vm_page_lookup(obj, OFF_TO_IDX(off + toff)); if (!m) @@ -2784,11 +2784,11 @@ inmem(struct vnode * vp, daddr_t blkno) (vm_offset_t) ((toff + off) & PAGE_MASK), tinc) == 0) goto notinmem; } - VM_OBJECT_WUNLOCK(obj); + VM_OBJECT_RUNLOCK(obj); return 1; notinmem: - VM_OBJECT_WUNLOCK(obj); + VM_OBJECT_RUNLOCK(obj); return (0); }