aboutsummaryrefslogtreecommitdiff
path: root/lib/test-string_helpers.c
diff options
context:
space:
mode:
authorHuang Ying <[email protected]>2017-05-03 14:54:33 -0700
committerLinus Torvalds <[email protected]>2017-05-03 15:52:10 -0700
commit9c1cc2e4f25c14dc1a2d98e98808aefef24abaf4 (patch)
tree90d7fbefa4ba009604633ce8d06cd8e3c64d3fac /lib/test-string_helpers.c
parent83612a948d3bd2e71b110d7e8735661621bd23d9 (diff)
mm, swap: fix comment in __read_swap_cache_async
Commit cbab0e4eec29 ("swap: avoid read_swap_cache_async() race to deadlock while waiting on discard I/O completion") fixed a deadlock in read_swap_cache_async(). Because at that time, in swap allocation path, a swap entry may be set as SWAP_HAS_CACHE, then wait for discarding to complete before the page for the swap entry is added to the swap cache. But in commit 815c2c543d3a ("swap: make swap discard async"), the discarding for swap become asynchronous, waiting for discarding to complete will be done before the swap entry is set as SWAP_HAS_CACHE. So the comments in code is incorrect now. This patch fixes the comments. The cond_resched() added in the commit cbab0e4eec29 is not necessary now too. But if we added some sleep in swap allocation path in the future, there may be some hard to debug/reproduce deadlock bug. So it is kept. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: "Huang, Ying" <[email protected]> Acked-by: Rafael Aquini <[email protected]> Cc: Shaohua Li <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/test-string_helpers.c')
0 files changed, 0 insertions, 0 deletions