Date: Wed, 27 Jul 2016 19:31:25 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303406 - head/sys/kern Message-ID: <201607271931.u6RJVPUf064151@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Wed Jul 27 19:31:25 2016 New Revision: 303406 URL: https://svnweb.freebsd.org/changeset/base/303406 Log: Adjust tests in fsync job scheduling loop to reduce indentation. Modified: head/sys/kern/vfs_aio.c Modified: head/sys/kern/vfs_aio.c ============================================================================== --- head/sys/kern/vfs_aio.c Wed Jul 27 18:29:35 2016 (r303405) +++ head/sys/kern/vfs_aio.c Wed Jul 27 19:31:25 2016 (r303406) @@ -913,18 +913,16 @@ notification_done: if (job->jobflags & KAIOCB_CHECKSYNC) { schedule_fsync = false; TAILQ_FOREACH_SAFE(sjob, &ki->kaio_syncqueue, list, sjobn) { - if (job->fd_file == sjob->fd_file && - job->seqno < sjob->seqno) { - if (--sjob->pending == 0) { - TAILQ_REMOVE(&ki->kaio_syncqueue, sjob, - list); - if (!aio_clear_cancel_function(sjob)) - continue; - TAILQ_INSERT_TAIL(&ki->kaio_syncready, - sjob, list); - schedule_fsync = true; - } - } + if (job->fd_file != sjob->fd_file || + job->seqno >= sjob->seqno) + continue; + if (--sjob->pending > 0) + continue; + TAILQ_REMOVE(&ki->kaio_syncqueue, sjob, list); + if (!aio_clear_cancel_function(sjob)) + continue; + TAILQ_INSERT_TAIL(&ki->kaio_syncready, sjob, list); + schedule_fsync = true; } if (schedule_fsync) taskqueue_enqueue(taskqueue_aiod_kick,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607271931.u6RJVPUf064151>