diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2021-05-03 14:29:47 +0300 |
---|---|---|
committer | Matthew Wilcox (Oracle) <willy@infradead.org> | 2022-01-03 04:28:53 +0300 |
commit | ece014141cd4b49f2d763f28b19e417b84460560 (patch) | |
tree | 00971b24644bff6a5d0a69b79cbfc5be6c254751 /include/linux/page-flags.h | |
parent | 22b3c8d6612e09f5fcecba1009d399aaf7f934f6 (diff) | |
download | linux-ece014141cd4b49f2d763f28b19e417b84460560.tar.xz |
mm/doc: Add documentation for folio_test_uptodate
Move the PG_uptodate documentation to be documentation for
folio_test_uptodate() and expand on it a little.
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 'include/linux/page-flags.h')
-rw-r--r-- | include/linux/page-flags.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index b5f14d581113..b3d353d537e2 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h @@ -68,9 +68,6 @@ * might lose their PG_swapbacked flag when they simply can be dropped (e.g. as * a result of MADV_FREE). * - * PG_uptodate tells whether the page's contents is valid. When a read - * completes, the page becomes uptodate, unless a disk I/O error happened. - * * PG_referenced, PG_reclaim are used for page reclaim for anonymous and * file-backed pagecache (see mm/vmscan.c). * @@ -615,6 +612,16 @@ TESTPAGEFLAG_FALSE(Ksm, ksm) u64 stable_page_flags(struct page *page); +/** + * folio_test_uptodate - Is this folio up to date? + * @folio: The folio. + * + * The uptodate flag is set on a folio when every byte in the folio is + * at least as new as the corresponding bytes on storage. Anonymous + * and CoW folios are always uptodate. If the folio is not uptodate, + * some of the bytes in it may be; see the is_partially_uptodate() + * address_space operation. + */ static inline bool folio_test_uptodate(struct folio *folio) { bool ret = test_bit(PG_uptodate, folio_flags(folio, 0)); |