Date: Wed, 2 Jun 2021 12:24:46 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 8d8bfdf20dc4 - stable/13 - Rework for-loop in EPOCH(9) to reduce indentation level. Message-ID: <202106021224.152COk9Q019052@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=8d8bfdf20dc473a163c74bcd00b94b083f81ae0c commit 8d8bfdf20dc473a163c74bcd00b94b083f81ae0c Author: Hans Petter Selasky <hselasky@FreeBSD.org> AuthorDate: 2021-05-21 08:20:34 +0000 Commit: Hans Petter Selasky <hselasky@FreeBSD.org> CommitDate: 2021-06-02 11:12:34 +0000 Rework for-loop in EPOCH(9) to reduce indentation level. No functional change intended. Sponsored by: Mellanox Technologies // NVIDIA Networking (cherry picked from commit cc9bb7a9b863c018a069a71392fa9baea98b5fdb) --- sys/kern/subr_epoch.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sys/kern/subr_epoch.c b/sys/kern/subr_epoch.c index 48567f97dcfa..210cf78d55f0 100644 --- a/sys/kern/subr_epoch.c +++ b/sys/kern/subr_epoch.c @@ -219,12 +219,14 @@ epoch_trace_enter(struct thread *td, epoch_t epoch, epoch_tracker_t et, { epoch_tracker_t iet; - SLIST_FOREACH(iet, &td->td_epochs, et_tlink) - if (iet->et_epoch == epoch) - epoch_trace_report("Recursively entering epoch %s " - "at %s:%d, previously entered at %s:%d\n", - epoch->e_name, file, line, - iet->et_file, iet->et_line); + SLIST_FOREACH(iet, &td->td_epochs, et_tlink) { + if (iet->et_epoch != epoch) + continue; + epoch_trace_report("Recursively entering epoch %s " + "at %s:%d, previously entered at %s:%d\n", + epoch->e_name, file, line, + iet->et_file, iet->et_line); + } et->et_epoch = epoch; et->et_file = file; et->et_line = line;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202106021224.152COk9Q019052>