diff options
author | Yu Zhao <yuzhao@google.com> | 2018-11-30 14:09:03 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-12-05 19:42:41 +0100 |
commit | 3c470638b6a61e30b753715d2e546456dccd9437 (patch) | |
tree | 4135c8b10b55ebcd3f138dfb6e2958bd77ed687f /drivers/hv | |
parent | 06c2233ac246507e98022809ea4752dbfead9337 (diff) | |
download | linux-stable-3c470638b6a61e30b753715d2e546456dccd9437.tar.gz linux-stable-3c470638b6a61e30b753715d2e546456dccd9437.tar.bz2 linux-stable-3c470638b6a61e30b753715d2e546456dccd9437.zip |
mm: use swp_offset as key in shmem_replace_page()
commit c1cb20d43728aa9b5393bd8d489bc85c142949b2 upstream.
We changed the key of swap cache tree from swp_entry_t.val to
swp_offset. We need to do so in shmem_replace_page() as well.
Hugh said:
"shmem_replace_page() has been wrong since the day I wrote it: good
enough to work on swap "type" 0, which is all most people ever use
(especially those few who need shmem_replace_page() at all), but
broken once there are any non-0 swp_type bits set in the higher order
bits"
Link: http://lkml.kernel.org/r/20181121215442.138545-1-yuzhao@google.com
Fixes: f6ab1f7f6b2d ("mm, swap: use offset of swap entry as key of swap cache")
Signed-off-by: Yu Zhao <yuzhao@google.com>
Reviewed-by: Matthew Wilcox <willy@infradead.org>
Acked-by: Hugh Dickins <hughd@google.com>
Cc: <stable@vger.kernel.org> [4.9+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hv')
0 files changed, 0 insertions, 0 deletions