[PATCH] Fix might_sleep in /proc/swaps code
This fixes a locking problem noted by Tim Hockin: * /proc/swaps uses seq_file code, calling seq_path() with swaplock held * seq_path() calls d_path() * d_path() calls mntput() which might_sleep() We add a new semaphore protecting insertions/removals in the set of swap components + switch of ->start()/->stop() to the same semaphore [fixes deadlocks] + trivial cleanup of ->next().
Showing
Please register or sign in to comment