Date: Sat, 4 May 2013 14:27:29 +0000 (UTC) From: Davide Italiano <davide@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r250238 - head/sys/fs/smbfs Message-ID: <201305041427.r44ERTRT004465@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <sys/namei.h> #include <sys/vnode.h> #include <sys/dirent.h> +#include <sys/rwlock.h> #include <sys/signalvar.h> #include <sys/sysctl.h> #include <sys/vmmeter.h> @@ -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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305041427.r44ERTRT004465>