diff options
| author | Andrew Morton <akpm@zip.com.au> | 2002-06-02 03:23:42 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-06-02 03:23:42 -0700 |
| commit | 91cb02b7abedb73a14c555f4b86467dbc637528c (patch) | |
| tree | 581fea38dc819c2e9c17f34702d194feb6b9202e /include | |
| parent | 3aeb30b05b91dde8af4bf5d17e1104db1d7c0cb5 (diff) | |
[PATCH] swapcache bugfixes
Fixes a few lock ranking bugs (and deadlocks) related to
swap_list_lock(), swap_device_lock(), mapping->page_lock and
mapping->private_lock.
- Cannot call block_flushpage->try_to_free_buffers() inside
mapping->page_lock. Because __set_page_dirty_buffers() takes
->page_lock inside ->private-lock.
- Cannot call swap_free->swap_list_lock/swap_device_lock inside
mapping->page_lock because exclusive_swap_page() takes ->page_lock
inside swap_info_get().
The patch also removes all the block_flushpage() calls from the swap
code in favour of a direct call to try_to_free_buffers().
The theory is that the page is locked, there is no I/O underway, nobody
else has access to the buffers so they MUST be freeable. A bunch of
BUG() checks have been added, and unless someone manages to trigger
one, the "block_flushpage() inside spinlock" problem is fixed.
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
