Date: Sun, 16 Jun 2013 16:07:35 +0000 (UTC) From: Attilio Rao <attilio@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r251808 - user/attilio/vmobj-readlock/sys/kern Message-ID: <201306161607.r5GG7ZaT083912@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: attilio Date: Sun Jun 16 16:07:34 2013 New Revision: 251808 URL: http://svnweb.freebsd.org/changeset/base/251808 Log: Style fix: avoid to duplicate checks when not necessary. Sponsored by: EMC / Isilon storage division Modified: user/attilio/vmobj-readlock/sys/kern/vfs_bio.c Modified: user/attilio/vmobj-readlock/sys/kern/vfs_bio.c ============================================================================== --- user/attilio/vmobj-readlock/sys/kern/vfs_bio.c Sun Jun 16 16:01:24 2013 (r251807) +++ user/attilio/vmobj-readlock/sys/kern/vfs_bio.c Sun Jun 16 16:07:34 2013 (r251808) @@ -1848,26 +1848,20 @@ vfs_vmio_release(struct buf *bp) */ vm_page_lock(m); vm_page_unwire(m, 0); + /* - * We don't mess with busy pages, it is - * the responsibility of the process that - * busied the pages to deal with them. - */ - if ((m->oflags & VPO_BUSY) == 0 && m->busy == 0 && - m->wire_count == 0) { - /* - * Might as well free the page if we can and it has - * no valid data. We also free the page if the - * buffer was used for direct I/O - */ - if ((bp->b_flags & B_ASYNC) == 0 && !m->valid) { + * Might as well free the page if we can and it has + * no valid data. We also free the page if the + * buffer was used for direct I/O + */ + if ((bp->b_flags & B_ASYNC) == 0 && !m->valid) { + if ((m->oflags & VPO_BUSY) == 0 && m->busy == 0 && + m->wire_count == 0) vm_page_free(m); - } else if (bp->b_flags & B_DIRECT) { - vm_page_try_to_free(m); - } else if (buf_vm_page_count_severe()) { - vm_page_try_to_cache(m); - } - } + } else if (bp->b_flags & B_DIRECT) + vm_page_try_to_free(m); + else if (buf_vm_page_count_severe()) + vm_page_try_to_cache(m); vm_page_unlock(m); } VM_OBJECT_WUNLOCK(bp->b_bufobj->bo_object);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306161607.r5GG7ZaT083912>