Date: Fri, 16 Dec 2016 23:33:37 +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: r310182 - head/sys/vm Message-ID: <201612162333.uBGNXbnM051694@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Fri Dec 16 23:33:37 2016 New Revision: 310182 URL: https://svnweb.freebsd.org/changeset/base/310182 Log: In swp_pager_meta_free_all(), fix type of the index variable. Style. Noted and reviewed by: alc (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/vm/swap_pager.c Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Fri Dec 16 23:05:47 2016 (r310181) +++ head/sys/vm/swap_pager.c Fri Dec 16 23:33:37 2016 (r310182) @@ -1916,30 +1916,30 @@ swp_pager_meta_free(vm_object_t object, static void swp_pager_meta_free_all(vm_object_t object) { - daddr_t index = 0; + struct swblock **pswap, *swap; + vm_pindex_t index; + daddr_t v; + int i; VM_OBJECT_ASSERT_WLOCKED(object); if (object->type != OBJT_SWAP) return; - while (object->un_pager.swp.swp_bcount) { - struct swblock **pswap; - struct swblock *swap; - + index = 0; + while (object->un_pager.swp.swp_bcount != 0) { mtx_lock(&swhash_mtx); pswap = swp_pager_hash(object, index); if ((swap = *pswap) != NULL) { - int i; - for (i = 0; i < SWAP_META_PAGES; ++i) { - daddr_t v = swap->swb_pages[i]; + v = swap->swb_pages[i]; if (v != SWAPBLK_NONE) { --swap->swb_count; swp_pager_freeswapspace(v, 1); } } if (swap->swb_count != 0) - panic("swap_pager_meta_free_all: swb_count != 0"); + panic( + "swap_pager_meta_free_all: swb_count != 0"); *pswap = swap->swb_hnext; uma_zfree(swap_zone, swap); --object->un_pager.swp.swp_bcount;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612162333.uBGNXbnM051694>