Date: Sat, 11 Jun 2011 20:13:28 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r222991 - head/sys/vm Message-ID: <201106112013.p5BKDSAY089591@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Sat Jun 11 20:13:28 2011 New Revision: 222991 URL: http://svn.freebsd.org/changeset/base/222991 Log: Fix a bug in r222586. Lock the page owner object around the modification of the m->dirty. Reported and tested by: nwhitehorn Reviewed by: alc Modified: head/sys/vm/vnode_pager.c Modified: head/sys/vm/vnode_pager.c ============================================================================== --- head/sys/vm/vnode_pager.c Sat Jun 11 18:39:55 2011 (r222990) +++ head/sys/vm/vnode_pager.c Sat Jun 11 20:13:28 2011 (r222991) @@ -1195,8 +1195,13 @@ vnode_pager_generic_putpages(struct vnod void vnode_pager_undirty_pages(vm_page_t *ma, int *rtvals, int written) { + vm_object_t obj; int i, pos; + if (written == 0) + return; + obj = ma[0]->object; + VM_OBJECT_LOCK(obj); for (i = 0, pos = 0; pos < written; i++, pos += PAGE_SIZE) { if (pos < trunc_page(written)) { rtvals[i] = VM_PAGER_OK; @@ -1207,4 +1212,5 @@ vnode_pager_undirty_pages(vm_page_t *ma, vm_page_clear_dirty(ma[i], 0, written & PAGE_MASK); } } + VM_OBJECT_UNLOCK(obj); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106112013.p5BKDSAY089591>