The patch titled fault-injection: optimize and simplify should_fail() has been added to the -mm tree. Its filename is fault-injection-optimize-and-simplify.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: fault-injection: optimize and simplify should_fail() From: Don Mullis <dwm@xxxxxxxx> Trivial optimization and simplification of should_fail(). Do cheaper disqualification tests first (performance gain not quantified). Simplify logic; eliminate goto. Signed-off-by: Don Mullis <dwm@xxxxxxxx> Cc: Akinobu Mita <akinobu.mita@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- lib/fault-inject.c | 11 ++++------- 1 files changed, 4 insertions(+), 7 deletions(-) diff -puN lib/fault-inject.c~fault-injection-optimize-and-simplify lib/fault-inject.c --- a/lib/fault-inject.c~fault-injection-optimize-and-simplify +++ a/lib/fault-inject.c @@ -142,9 +142,6 @@ bool should_fail(struct fault_attr *attr if (attr->task_filter && !fail_task(attr, current)) return false; - if (!fail_stacktrace(attr)) - return false; - if (atomic_read(&attr->times) == 0) return false; @@ -159,12 +156,12 @@ bool should_fail(struct fault_attr *attr return false; } - if (attr->probability > random32() % 100) - goto fail; + if (attr->probability <= random32() % 100) + return false; - return false; + if (!fail_stacktrace(attr)) + return false; -fail: fail_dump(attr); if (atomic_read(&attr->times) != -1) _ Patches currently in -mm which might be from dwm@xxxxxxxx are kconfig-refactoring-for-better-menu-nesting.patch fault-injection-documentation-and-scripts.patch fault-injection-capabilities-infrastructure.patch fault-injection-capabilities-infrastructure-tidy.patch fault-injection-capabilities-infrastructure-tweaks.patch fault-injection-stacktrace-filtering.patch fault-injection-stacktrace-filtering-reject-failure-if-any-caller-lies-within-specified-range.patch fault-injection-Kconfig-cleanup.patch fault-injection-stacktrace-filtering-kconfig-fix.patch fault-injection-correct-disambiguate-and.patch fault-injection-use-bool-true-false-throughout.patch fault-injection-clamp-debugfs-stacktrace-depth-to.patch fault-injection-optimize-and-simplify.patch fault-injection-defaults-likely-to-please-a-new.patch sched-improve-migration-accuracy-fix.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html