]> Git Repo - linux.git/commit - mm/swapfile.c
frontswap: get rid of swap_lock dependency
authorMinchan Kim <[email protected]>
Tue, 30 Apr 2013 22:26:54 +0000 (15:26 -0700)
committerLinus Torvalds <[email protected]>
Wed, 1 May 2013 00:04:00 +0000 (17:04 -0700)
commit4f89849da22db9d0edb378acea65e23fcd546173
tree8af95a340c8d8605ad8f492ef0f6f98f2a4e4523
parentf066ea230a65f939afc354beae62716ab5f0e645
frontswap: get rid of swap_lock dependency

Frontswap initialization routine depends on swap_lock, which want to be
atomic about frontswap's first appearance.  IOW, frontswap is not present
and will fail all calls OR frontswap is fully functional but if new
swap_info_struct isn't registered by enable_swap_info, swap subsystem
doesn't start I/O so there is no race between init procedure and page I/O
working on frontswap.

So let's remove unnecessary swap_lock dependency.

Cc: Dan Magenheimer <[email protected]>
Signed-off-by: Minchan Kim <[email protected]>
[v1: Rebased on my branch, reworked to work with backends loading late]
[v2: Added a check for !map]
[v3: Made the invalidate path follow the init path]
[v4: Address comments by Wanpeng Li <[email protected]>]
Signed-off-by: Konrad Rzeszutek Wilk <[email protected]>
Signed-off-by: Bob Liu <[email protected]>
Cc: Wanpeng Li <[email protected]>
Cc: Andor Daam <[email protected]>
Cc: Florian Schmaus <[email protected]>
Cc: Stefan Hengelein <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
include/linux/frontswap.h
mm/frontswap.c
mm/swapfile.c
This page took 0.058701 seconds and 4 git commands to generate.