summaryrefslogtreecommitdiff
path: root/include/linux/writeback.h
diff options
context:
space:
mode:
authorCheng Li <lic121@chinatelecom.cn>2022-09-09 10:31:09 +0300
committerAndrew Morton <akpm@linux-foundation.org>2022-10-04 00:03:08 +0300
commit14455eabd8404a503dc8e80cd8ce185e96a94b22 (patch)
treeebe035ca739c4efeecb5c1679aeb839db43ab101 /include/linux/writeback.h
parent0d83b2d89dbfad17b62d4e7fb8f0b0525ba1a204 (diff)
downloadlinux-14455eabd8404a503dc8e80cd8ce185e96a94b22.tar.xz
mm: use nth_page instead of mem_map_offset mem_map_next
To handle the discontiguous case, mem_map_next() has a parameter named `offset`. As a function caller, one would be confused why "get next entry" needs a parameter named "offset". The other drawback of mem_map_next() is that the callers must take care of the map between parameter "iter" and "offset", otherwise we may get an hole or duplication during iteration. So we use nth_page instead of mem_map_next. And replace mem_map_offset with nth_page() per Matthew's comments. Link: https://lkml.kernel.org/r/1662708669-9395-1-git-send-email-lic121@chinatelecom.cn Signed-off-by: Cheng Li <lic121@chinatelecom.cn> Fixes: 69d177c2fc70 ("hugetlbfs: handle pages higher order than MAX_ORDER") Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: Mike Kravetz <mike.kravetz@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux/writeback.h')
0 files changed, 0 insertions, 0 deletions