diff options
author | John Hubbard <[email protected]> | 2019-10-18 20:19:53 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2019-10-19 06:32:32 -0400 |
commit | 0cd22afdcea21fa16bb5b0d3e0508ca42072d0bd (patch) | |
tree | eb856e14bac0ae8fb696c04d44c748cac9135f79 /tools/perf/util/trace-event-scripting.c | |
parent | 6f24c8d30d08f270b54f4c2cb9b08dfccbe59c57 (diff) |
mm/gup: fix a misnamed "write" argument, and a related bug
In several routines, the "flags" argument is incorrectly named "write".
Change it to "flags".
Also, in one place, the misnaming led to an actual bug:
"flags & FOLL_WRITE" is required, rather than just "flags".
(That problem was flagged by krobot, in v1 of this patch.)
Also, change the flags argument from int, to unsigned int.
You can see that this was a simple oversight, because the
calling code passes "flags" to the fifth argument:
gup_pgd_range():
...
if (!gup_huge_pd(__hugepd(pgd_val(pgd)), addr,
PGDIR_SHIFT, next, flags, pages, nr))
...which, until this patch, the callees referred to as "write".
Also, change two lines to avoid checkpatch line length
complaints, and another line to fix another oversight
that checkpatch called out: missing "int" on pdshift.
Link: http://lkml.kernel.org/r/[email protected]
Fixes: b798bec4741b ("mm/gup: change write parameter to flags in fast walk")
Signed-off-by: John Hubbard <[email protected]>
Reported-by: kbuild test robot <[email protected]>
Suggested-by: Kirill A. Shutemov <[email protected]>
Suggested-by: Ira Weiny <[email protected]>
Acked-by: Kirill A. Shutemov <[email protected]>
Reviewed-by: Ira Weiny <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Aneesh Kumar K.V <[email protected]>
Cc: Keith Busch <[email protected]>
Cc: Shuah Khan <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions