lkml.org 
[lkml]   [2023]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: linux-next: manual merge of the mm-stable tree with the cifs tree
On Tue, Feb 21, 2023 at 02:39:24PM +0000, David Howells wrote:
> - folio = page_folio(head_page);
> - start = folio_pos(folio); /* May regress with THPs */
> + for (i = 0; i < n; i++) {
> + folio = fbatch.folios[i];
> + start = folio_pos(folio); /* May regress with THPs */

What does this comment mean?

> + /* At this point we hold neither the i_pages lock nor the
> + * page lock: the page may be truncated or invalidated
> + * (changing page->mapping to NULL), or even swizzled
> + * back from swapper_space to tmpfs file mapping

Where does this comment come from? This is cifs, not tmpfs. You'll
never be asked to writeback a page from the swap cache. Dirty pages
can be truncated, so the first half of the comment is still accurate.
I'd rather it moved down to below the folio lock, and was rephrased
so it described why we're checking everything again.

The actual code looks right.

\
 
 \ /
  Last update: 2023-03-27 00:30    [W:0.181 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site