Rework find_get_entries() and find_lock_entries()
Status from this message: [merged mm-stable] filemap-find_get_entries-now-updates-start-offset.patch removed from -mm tree
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest2 patches 4 repliesApplied 2/2
- v22 patches 1 replySuperseded
- v14 patches 2 repliesSuperseded
Changes in v3 from the cover letter
Fixed a typo in commit messages
Shifted calculations to after the rcu_read_unlock()
Patches in v3 All 2 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | filemap: find_lock_entries() now updates start offsetmm/ mm/ mm/ +1 more | +18 | 4 replies | Applied |
| 2/2 | filemap: find_get_entries() now updates start offsetmm/ mm/ mm/ +1 more | +23 | 0 replies | Applied |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.
Cover letter [PATCH v3 0/2] Rework find_get_entries() and find_lock_entries()
Originally the callers of find_get_entries() and find_lock_entries() were keeping track of the start index themselves as
they traverse the search range.
This resulted in hacky code such as in shmem_undo_range():
index = folio->index + folio_nr_pages(folio) - 1;
where the - 1 is only present to stay in the right spot after incrementing index later. This sort of calculation was also being done on every folio despite not even using index later within that function.
These patches change find_get_entries() and find_lock_entries() to calculate the new index instead of leaving it to the callers so we can avoid all these complications.
---
v3:
Fixed a typo in commit messages
Shifted calculations to after the rcu_read_unlock()
v2:
Fixed an issue when handling shadow entries
Dropped patches removing the indices array; it is required for value
entries
Vishal Moola (Oracle) (2):
filemap: find_lock_entries() now updates start offset
filemap: find_get_entries() now updates start offset
mm/filemap.c | 28 +++++++++++++++++++++++----- mm/internal.h | 4 ++-- mm/shmem.c | 19 ++++++------------- mm/truncate.c | 30 ++++++++++-------------------- 4 files changed, 41 insertions(+), 40 deletions(-)
Signature · 1 line
2.36.1