Re: linux-next: manual merge of the mm-stable tree with the cifs tree

From: David Howells
Date: Tue Feb 21 2023 - 10:21:55 EST


Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote:

> > + /* 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.

Actually, it's in v6.2 cifs and I just move it in the patch where I copy the
afs writepages implementation into cifs. afs got it in 2007 when I added
write support[1] and I suspect I copied it from cifs. cifs got it in 2005
when Steve added writepages support[2]. I think he must've got it from
fs/mpage.c and the comment there is prehistoric.

David

31143d5d515ece617ffccb7df5ff75e4d1dfa120 [1]
37c0eb4677f733a773df6287b0f73f00274402e3 [2]