summaryrefslogtreecommitdiff
path: root/fs/cachefiles
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2024-01-06 01:03:58 +0300
committerDavid Howells <dhowells@redhat.com>2024-01-06 02:13:48 +0300
commit807c6d09cc99cbdf9933edfadcbaa8f0b856848d (patch)
tree4ac3fb1575ab147903339b51fd201f401fc63ccc /fs/cachefiles
parent92a714d727ec9e7ccfcc7432d348aba730145914 (diff)
downloadlinux-807c6d09cc99cbdf9933edfadcbaa8f0b856848d.tar.xz
netfs: Fix the loop that unmarks folios after writing to the cache
In the loop in netfs_rreq_unmark_after_write() that removes the PG_fscache from folios after they've been written to the cache, as soon as we remove the mark from a multipage folio, it can get split - and then we might see a fragment of folio again. Guard against this by advancing the 'unlocked' tracker to the index of the last page in the folio to avoid a double removal of the PG_fscache mark. Reported-by: Marc Dionne <marc.dionne@auristor.com> Signed-off-by: David Howells <dhowells@redhat.com> cc: Matthew Wilcox <willy@infradead.org> cc: linux-afs@lists.infradead.org cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org
Diffstat (limited to 'fs/cachefiles')
0 files changed, 0 insertions, 0 deletions