diff options
author | Ingo Molnar <mingo@kernel.org> | 2017-08-11 13:51:59 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-08-11 13:51:59 +0200 |
commit | 040cca3ab2f6f8b8d26e0e4965abea2b9aa14818 (patch) | |
tree | 25709ba52ee06fccf4bfbfbf2897bb8cf86da828 /lib/fault-inject.c | |
parent | locking/lockdep: Add 'crossrelease' feature documentation (diff) | |
parent | Merge tag 'drm-fixes-for-v4.13-rc5' of git://people.freedesktop.org/~airlied/... (diff) | |
download | linux-040cca3ab2f6f8b8d26e0e4965abea2b9aa14818.tar.xz linux-040cca3ab2f6f8b8d26e0e4965abea2b9aa14818.zip |
Merge branch 'linus' into locking/core, to resolve conflicts
Conflicts:
include/linux/mm_types.h
mm/huge_memory.c
I removed the smp_mb__before_spinlock() like the following commit does:
8b1b436dd1cc ("mm, locking: Rework {set,clear,mm}_tlb_flush_pending()")
and fixed up the affected commits.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'lib/fault-inject.c')
-rw-r--r-- | lib/fault-inject.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/fault-inject.c b/lib/fault-inject.c index 7d315fdb9f13..cf7b129b0b2b 100644 --- a/lib/fault-inject.c +++ b/lib/fault-inject.c @@ -110,10 +110,12 @@ bool should_fail(struct fault_attr *attr, ssize_t size) if (in_task()) { unsigned int fail_nth = READ_ONCE(current->fail_nth); - if (fail_nth && !WRITE_ONCE(current->fail_nth, fail_nth - 1)) - goto fail; + if (fail_nth) { + if (!WRITE_ONCE(current->fail_nth, fail_nth - 1)) + goto fail; - return false; + return false; + } } /* No need to check any other properties if the probability is 0 */ |