summaryrefslogtreecommitdiffstats
path: root/fs/fcntl.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2022-05-09 18:20:49 -0700
committerakpm <akpm@linux-foundation.org>2022-05-09 18:20:49 -0700
commita1a0dfd56f97738c1974976309bbf38bb5a21132 (patch)
tree2f4aa69a0ba85c406ada1759cd57d9695d0417d9 /fs/fcntl.c
parent2282679fb20bf036a714ed49fadd0230c278a203 (diff)
downloadlinux-stable-a1a0dfd56f97738c1974976309bbf38bb5a21132.tar.gz
linux-stable-a1a0dfd56f97738c1974976309bbf38bb5a21132.tar.bz2
linux-stable-a1a0dfd56f97738c1974976309bbf38bb5a21132.zip
mm: handle THP in swap_*page_fs()
Pages passed to swap_readpage()/swap_writepage() are not necessarily all the same size - there may be transparent-huge-pages involves. The BIO paths of swap_*page() handle this correctly, but the SWP_FS_OPS path does not. So we need to use thp_size() to find the size, not just assume PAGE_SIZE, and we need to track the total length of the request, not just assume it is "page * PAGE_SIZE". Link: https://lkml.kernel.org/r/165119301488.15698.9457662928942765453.stgit@noble.brown Signed-off-by: NeilBrown <neilb@suse.de> Reported-by: Miaohe Lin <linmiaohe@huawei.com> Cc: Christoph Hellwig <hch@lst.de> Cc: David Howells <dhowells@redhat.com> Cc: Geert Uytterhoeven <geert+renesas@glider.be> Cc: Hugh Dickins <hughd@google.com> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'fs/fcntl.c')
0 files changed, 0 insertions, 0 deletions