mirror of
https://github.com/torvalds/linux.git
synced 2026-01-25 07:47:50 +00:00
mm: remove __filemap_fdatawrite
And rewrite filemap_fdatawrite to use filemap_fdatawrite_range instead to have a simpler call chain. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://patch.msgid.link/20251024080431.324236-8-hch@lst.de Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> 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
7fabcb7fba
commit
7359651448
22
mm/filemap.c
22
mm/filemap.c
@@ -422,25 +422,19 @@ int __filemap_fdatawrite_range(struct address_space *mapping, loff_t start,
|
||||
return filemap_fdatawrite_wbc(mapping, &wbc);
|
||||
}
|
||||
|
||||
static inline int __filemap_fdatawrite(struct address_space *mapping,
|
||||
int sync_mode)
|
||||
{
|
||||
return __filemap_fdatawrite_range(mapping, 0, LLONG_MAX, sync_mode);
|
||||
}
|
||||
|
||||
int filemap_fdatawrite(struct address_space *mapping)
|
||||
{
|
||||
return __filemap_fdatawrite(mapping, WB_SYNC_ALL);
|
||||
}
|
||||
EXPORT_SYMBOL(filemap_fdatawrite);
|
||||
|
||||
int filemap_fdatawrite_range(struct address_space *mapping, loff_t start,
|
||||
loff_t end)
|
||||
loff_t end)
|
||||
{
|
||||
return __filemap_fdatawrite_range(mapping, start, end, WB_SYNC_ALL);
|
||||
}
|
||||
EXPORT_SYMBOL(filemap_fdatawrite_range);
|
||||
|
||||
int filemap_fdatawrite(struct address_space *mapping)
|
||||
{
|
||||
return filemap_fdatawrite_range(mapping, 0, LLONG_MAX);
|
||||
}
|
||||
EXPORT_SYMBOL(filemap_fdatawrite);
|
||||
|
||||
/**
|
||||
* filemap_fdatawrite_range_kick - start writeback on a range
|
||||
* @mapping: target address_space
|
||||
@@ -470,7 +464,7 @@ EXPORT_SYMBOL_GPL(filemap_fdatawrite_range_kick);
|
||||
*/
|
||||
int filemap_flush(struct address_space *mapping)
|
||||
{
|
||||
return __filemap_fdatawrite(mapping, WB_SYNC_NONE);
|
||||
return filemap_fdatawrite_range_kick(mapping, 0, LLONG_MAX);
|
||||
}
|
||||
EXPORT_SYMBOL(filemap_flush);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user