diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2020-12-20 06:44:51 -0500 |
---|---|---|
committer | Matthew Wilcox (Oracle) <willy@infradead.org> | 2022-01-02 20:28:57 -0500 |
commit | a229a4f00d1eab3f665b92dc9f8dbceca9b8f49c (patch) | |
tree | 8ec748354a535deaff55631c78366eaaeac0986e /mm/page-writeback.c | |
parent | ece014141cd4b49f2d763f28b19e417b84460560 (diff) | |
download | linux-a229a4f00d1eab3f665b92dc9f8dbceca9b8f49c.tar.bz2 |
mm/writeback: Improve __folio_mark_dirty() comment
Add some notes about how this function needs to be called.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: William Kucharski <william.kucharski@oracle.com>
Diffstat (limited to 'mm/page-writeback.c')
-rw-r--r-- | mm/page-writeback.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index a613f8ef6a02..91d163f8d36b 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -2496,7 +2496,11 @@ void folio_account_cleaned(struct folio *folio, struct address_space *mapping, * If warn is true, then emit a warning if the folio is not uptodate and has * not been truncated. * - * The caller must hold lock_page_memcg(). + * The caller must hold lock_page_memcg(). Most callers have the folio + * locked. A few have the folio blocked from truncation through other + * means (eg zap_page_range() has it mapped and is holding the page table + * lock). This can also be called from mark_buffer_dirty(), which I + * cannot prove is always protected against truncate. */ void __folio_mark_dirty(struct folio *folio, struct address_space *mapping, int warn) |