aboutsummaryrefslogtreecommitdiff
path: root/lib/netdev-notifier-error-inject.c
diff options
context:
space:
mode:
authorHuang Ying <[email protected]>2019-07-11 20:55:37 -0700
committerLinus Torvalds <[email protected]>2019-07-12 11:05:43 -0700
commit054f1d1faaed6a7930b77286d607ae45c01d0443 (patch)
tree802f48b10995d9b82f40040ce91d63e19104f685 /lib/netdev-notifier-error-inject.c
parenteb085574a7526c4375965c5fbf7e5b0c19cdd336 (diff)
mm/swap_state.c: simplify total_swapcache_pages() with get_swap_device()
total_swapcache_pages() may race with swapper_spaces[] allocation and freeing. Previously, this is protected with a swapper_spaces[] specific RCU mechanism. To simplify the logic/code complexity, it is replaced with get/put_swap_device(). The code line number is reduced too. Although not so important, the swapoff() performance improves too because one synchronize_rcu() call during swapoff() is deleted. [[email protected]: fix bad swap file entry warning] Link: http://lkml.kernel.org/r/[email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: "Huang, Ying" <[email protected]> Reviewed-by: Andrew Morton <[email protected]> Tested-by: Mike Kravetz <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: Paul E. McKenney <[email protected]> Cc: Minchan Kim <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: Tim Chen <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Jérôme Glisse <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Andrea Arcangeli <[email protected]> Cc: Yang Shi <[email protected]> Cc: David Rientjes <[email protected]> Cc: Rik van Riel <[email protected]> Cc: Jan Kara <[email protected]> Cc: Dave Jiang <[email protected]> Cc: Daniel Jordan <[email protected]> Cc: Andrea Parri <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/netdev-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions