From owner-svn-src-all@FreeBSD.ORG Sat May 4 14:27:29 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 79D50C31; Sat, 4 May 2013 14:27:29 +0000 (UTC) (envelope-from davide@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 513C21D34; Sat, 4 May 2013 14:27:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r44ERTQo004466; Sat, 4 May 2013 14:27:29 GMT (envelope-from davide@svn.freebsd.org) Received: (from davide@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r44ERTRT004465; Sat, 4 May 2013 14:27:29 GMT (envelope-from davide@svn.freebsd.org) Message-Id: <201305041427.r44ERTRT004465@svn.freebsd.org> From: Davide Italiano Date: Sat, 4 May 2013 14:27:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r250238 - head/sys/fs/smbfs 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: Sat, 04 May 2013 14:27:29 -0000 Author: davide Date: Sat May 4 14:27:28 2013 New Revision: 250238 URL: http://svnweb.freebsd.org/changeset/base/250238 Log: Change VM_OBJECT_LOCK/UNLOCK() -> VM_OBJECT_WLOCK/WUNLOCK() to reflect the recent switch of the vm object lock to a rwlock. Reported by: attilio Modified: head/sys/fs/smbfs/smbfs_io.c Modified: head/sys/fs/smbfs/smbfs_io.c ============================================================================== --- head/sys/fs/smbfs/smbfs_io.c Sat May 4 14:18:10 2013 (r250237) +++ head/sys/fs/smbfs/smbfs_io.c Sat May 4 14:27:28 2013 (r250238) @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -460,7 +461,7 @@ smbfs_getpages(ap) */ m = pages[reqpage]; - VM_OBJECT_LOCK(object); + VM_OBJECT_WLOCK(object); if (m->valid != 0) { for (i = 0; i < npages; ++i) { if (i != reqpage) { @@ -469,10 +470,10 @@ smbfs_getpages(ap) vm_page_unlock(pages[i]); } } - VM_OBJECT_UNLOCK(object); + VM_OBJECT_WUNLOCK(object); return 0; } - VM_OBJECT_UNLOCK(object); + VM_OBJECT_WUNLOCK(object); scred = smbfs_malloc_scred(); smb_makescred(scred, td, cred); @@ -500,7 +501,7 @@ smbfs_getpages(ap) relpbuf(bp, &smbfs_pbuf_freecnt); - VM_OBJECT_LOCK(object); + VM_OBJECT_WLOCK(object); if (error && (uio.uio_resid == count)) { printf("smbfs_getpages: error %d\n",error); for (i = 0; i < npages; i++) { @@ -510,7 +511,7 @@ smbfs_getpages(ap) vm_page_unlock(pages[i]); } } - VM_OBJECT_UNLOCK(object); + VM_OBJECT_WUNLOCK(object); return VM_PAGER_ERROR; } @@ -548,7 +549,7 @@ smbfs_getpages(ap) if (i != reqpage) vm_page_readahead_finish(m); } - VM_OBJECT_UNLOCK(object); + VM_OBJECT_WUNLOCK(object); return 0; #endif /* SMBFS_RWGENERIC */ } @@ -667,9 +668,9 @@ smbfs_vinvalbuf(struct vnode *vp, struct np->n_flag |= NFLUSHINPROG; if (vp->v_bufobj.bo_object != NULL) { - VM_OBJECT_LOCK(vp->v_bufobj.bo_object); + VM_OBJECT_WLOCK(vp->v_bufobj.bo_object); vm_object_page_clean(vp->v_bufobj.bo_object, 0, 0, OBJPC_SYNC); - VM_OBJECT_UNLOCK(vp->v_bufobj.bo_object); + VM_OBJECT_WUNLOCK(vp->v_bufobj.bo_object); } error = vinvalbuf(vp, V_SAVE, PCATCH, 0);