Date: Tue, 24 May 2016 19:20:30 +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: r300622 - head/sys/vm Message-ID: <201605241920.u4OJKUfV099672@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Tue May 24 19:20:30 2016 New Revision: 300622 URL: https://svnweb.freebsd.org/changeset/base/300622 Log: In vm_page_cache(), only drop the vnode after radix insert failure for empty page cache when the object type if OBJT_VNODE. Reported and tested by: pho Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Tue May 24 18:53:06 2016 (r300621) +++ head/sys/vm/vm_page.c Tue May 24 19:20:30 2016 (r300622) @@ -3290,7 +3290,8 @@ vm_page_cache(vm_page_t m) cache_was_empty = vm_radix_is_empty(&object->cache); if (vm_radix_insert(&object->cache, m)) { mtx_unlock(&vm_page_queue_free_mtx); - if (object->resident_page_count == 0) + if (object->type == OBJT_VNODE && + object->resident_page_count == 0) vdrop(object->handle); m->object = NULL; vm_page_free(m);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605241920.u4OJKUfV099672>