summaryrefslogtreecommitdiffstats
path: root/mm/swap_state.c
diff options
context:
space:
mode:
authorMatthew Wilcox2019-03-06 00:44:08 +0100
committerLinus Torvalds2019-03-06 06:07:16 +0100
commit14ef1fc72a3e86cea6498193c5e04b4619cb8622 (patch)
tree51dca5e31d99fc92626bfe7c3eebfb4543201554 /mm/swap_state.c
parentmm/memcontrol.c: use struct_size() in kmalloc() (diff)
downloadkernel-qcow2-linux-14ef1fc72a3e86cea6498193c5e04b4619cb8622.tar.gz
kernel-qcow2-linux-14ef1fc72a3e86cea6498193c5e04b4619cb8622.tar.xz
kernel-qcow2-linux-14ef1fc72a3e86cea6498193c5e04b4619cb8622.zip
mm/filemap.c: remove redundant test from find_get_pages_contig
After we establish a reference on the page, we check the pointer continues to be in the correct position in i_pages. Checking page->index afterwards is unnecessary; if it were to change, then the pointer to it from the page cache would also move. The check used to be done before grabbing a reference on the page which was racy (see commit 9cbb4cb21b19f ("mm: find_get_pages_contig fixlet")), but nobody noticed that moving the check after grabbing the reference was redundant. Link: http://lkml.kernel.org/r/20190107200224.13260-1-willy@infradead.org Signed-off-by: Matthew Wilcox <willy@infradead.org> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Cc: Hugh Dickins <hughd@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/swap_state.c')
0 files changed, 0 insertions, 0 deletions