]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mm: assert the folio is locked in folio_start_writeback()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Wed, 26 Feb 2025 15:36:12 +0000 (15:36 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 17 Mar 2025 07:05:29 +0000 (00:05 -0700)
commit173a3dc051bda746e284ff3933fcf6771d7247b8
tree1a430442e485c280b1646cc0d7b803a75ef940e3
parenta58f3dcf20ea9e7e968ee8369fd782bbb53dff73
mm: assert the folio is locked in folio_start_writeback()

The folio must be locked when we start writeback in order to prevent
writeback from being started twice on the same folio.  I don't expect this
to catch any problems, but it should be good documentation.

Link: https://lkml.kernel.org/r/20250226153614.3774896-1-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/page-writeback.c