diff options
author | Omar Sandoval <[email protected]> | 2018-05-25 14:47:17 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2018-05-25 18:12:10 -0700 |
commit | 7cbf319234adaa4518a28c8c523d3330e06638f0 (patch) | |
tree | c25ce860d1ba8ac686456d181acca73048d3a1a5 /tools/perf/util/scripting-engines/trace-event-python.c | |
parent | 62d18ecfa64137349fac9c5817784fbd48b54f48 (diff) |
mm: fix nr_rotate_swap leak in swapon() error case
If swapon() fails after incrementing nr_rotate_swap, we don't decrement
it and thus effectively leak it. Make sure we decrement it if we
incremented it.
Link: http://lkml.kernel.org/r/b6fe6b879f17fa68eee6cbd876f459f6e5e33495.1526491581.git.osandov@fb.com
Fixes: 81a0298bdfab ("mm, swap: don't use VMA based swap readahead if HDD is used as swap")
Signed-off-by: Omar Sandoval <[email protected]>
Reviewed-by: Rik van Riel <[email protected]>
Reviewed-by: "Huang, Ying" <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions