mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 12:21:22 -05:00
fs: Move clearing of mappedtodisk to buffer.c
The mappedtodisk flag is only meaningful for buffer head based filesystems. It should not be cleared for other filesystems. This allows us to reuse the mappedtodisk flag to have other meanings in filesystems that do not use buffer heads. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Link: https://lore.kernel.org/r/20241002040111.1023018-2-willy@infradead.org Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
committed by
Christian Brauner
parent
9852d85ec9
commit
9c33d85e34
@@ -1649,6 +1649,7 @@ void block_invalidate_folio(struct folio *folio, size_t offset, size_t length)
|
||||
if (length == folio_size(folio))
|
||||
filemap_release_folio(folio, 0);
|
||||
out:
|
||||
folio_clear_mappedtodisk(folio);
|
||||
return;
|
||||
}
|
||||
EXPORT_SYMBOL(block_invalidate_folio);
|
||||
|
||||
@@ -166,7 +166,6 @@ static void truncate_cleanup_folio(struct folio *folio)
|
||||
* Hence dirty accounting check is placed after invalidation.
|
||||
*/
|
||||
folio_cancel_dirty(folio);
|
||||
folio_clear_mappedtodisk(folio);
|
||||
}
|
||||
|
||||
int truncate_inode_folio(struct address_space *mapping, struct folio *folio)
|
||||
|
||||
Reference in New Issue
Block a user