aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/exported-sql-viewer.py
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <[email protected]>2024-02-15 07:36:44 +0100
committerAndrew Morton <[email protected]>2024-02-23 17:48:36 -0800
commit807d1fe36077decf6f4ef8d4b63a084760a5c5fc (patch)
treeaada37024a42396ccefb080eb0d7c6a4efc1e00a /tools/perf/scripts/python/exported-sql-viewer.py
parent751e0d559c62a87dc828af22c3c58dc078c734e3 (diff)
writeback: simplify the loops in write_cache_pages()
Collapse the two nested loops into one. This is needed as a step towards turning this into an iterator. Note that this drops the "index <= end" check in the previous outer loop and just relies on filemap_get_folios_tag() to return 0 entries when index > end. This actually has a subtle implication when end == -1 because then the returned index will be -1 as well and thus if there is page present on index -1, we could be looping indefinitely. But as the comment in filemap_get_folios_tag documents this as already broken anyway we should not worry about it here either. The fix for that would probably a change to the filemap_get_folios_tag() calling convention. [[email protected]: update the commit log per Jan] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Matthew Wilcox (Oracle) <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Brian Foster <[email protected]> Reviewed-by: Jan Kara <[email protected]> Acked-by: Dave Chinner <[email protected]> Cc: Christian Brauner <[email protected]> Cc: David Howells <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions