Skip to contentSkip to conversation

mm-readahead-add-kerneldoc-for-read_pages.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Jun 2

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm/readahead: add kerneldoc for read_pages
has been removed from the -mm tree. Its filename was
mm-readahead-add-kerneldoc-for-read_pages.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Frederick Mayle <[email protected]>
Subject: mm/readahead: add kerneldoc for read_pages
Date: Tue, 12 May 2026 13:31:35 -0700

Patch series "mm: document read_pages and simplify usage".

Add a kerneldoc for read_pages() to formalize an invariant and then use it to simplify the callers in page_cache_ra_unbounded().

This patch (of 2):

Formalize one of the invariants provided by the current implementation so that callers can depend on it, as discussed in [1].

---

 mm/readahead.c |   11 +++++++++++
 1 file changed, 11 insertions(+)
mm/readahead.c renamed from mm/readahead.c~mm-readahead-add-kerneldoc-for-read_pages +11 -0
@@ -146,6 +146,17 @@ file_ra_state_init(struct file_ra_state
 }
 EXPORT_SYMBOL_GPL(file_ra_state_init);
 
+/**
+ * read_pages() - Start IO for a contiguous range of allocated folios in the
+ *                page cache.
+ * @rac: Readahead control.
+ *
+ * When read_pages() returns, it is guaranteed that all of the folios will have
+ * been processed or removed so that ``readahead_count(rac) == 0``. However,
+ * that does not imply that ``readahead_index(rac)`` will be updated to point
+ * to the end of the originally requested range because, for example, the
+ * filesystem may expand the range upwards.
+ */
 static void read_pages(struct readahead_control *rac)
 {
 	const struct address_space_operations *aops = rac->mapping->a_ops;

_

Patches currently in -mm which might be from [email protected] are