Skip to content

Commit 9c33d85

Browse files
Matthew Wilcox (Oracle)brauner
authored andcommitted
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) <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Jan Kara <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
1 parent 9852d85 commit 9c33d85

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

fs/buffer.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1649,6 +1649,7 @@ void block_invalidate_folio(struct folio *folio, size_t offset, size_t length)
16491649
if (length == folio_size(folio))
16501650
filemap_release_folio(folio, 0);
16511651
out:
1652+
folio_clear_mappedtodisk(folio);
16521653
return;
16531654
}
16541655
EXPORT_SYMBOL(block_invalidate_folio);

mm/truncate.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ static void truncate_cleanup_folio(struct folio *folio)
166166
* Hence dirty accounting check is placed after invalidation.
167167
*/
168168
folio_cancel_dirty(folio);
169-
folio_clear_mappedtodisk(folio);
170169
}
171170

172171
int truncate_inode_folio(struct address_space *mapping, struct folio *folio)

0 commit comments

Comments
 (0)