mirror of https://github.com/torvalds/linux.git
mm: rename filemap_fdatawrite_range_kick to filemap_flush_range
Rename filemap_fdatawrite_range_kick to filemap_flush_range because it is the ranged version of filemap_flush. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://patch.msgid.link/20251024080431.324236-11-hch@lst.de Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
parent
45cbce5b88
commit
c28d67b33c
|
|
@ -285,8 +285,7 @@ int sync_file_range(struct file *file, loff_t offset, loff_t nbytes,
|
|||
ret = filemap_fdatawrite_range(mapping, offset,
|
||||
endbyte);
|
||||
else
|
||||
ret = filemap_fdatawrite_range_kick(mapping, offset,
|
||||
endbyte);
|
||||
ret = filemap_flush_range(mapping, offset, endbyte);
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3014,7 +3014,7 @@ extern int __must_check file_fdatawait_range(struct file *file, loff_t lstart,
|
|||
extern int __must_check file_check_and_advance_wb_err(struct file *file);
|
||||
extern int __must_check file_write_and_wait_range(struct file *file,
|
||||
loff_t start, loff_t end);
|
||||
int filemap_fdatawrite_range_kick(struct address_space *mapping, loff_t start,
|
||||
int filemap_flush_range(struct address_space *mapping, loff_t start,
|
||||
loff_t end);
|
||||
|
||||
static inline int file_write_and_wait(struct file *file)
|
||||
|
|
@ -3051,7 +3051,7 @@ static inline ssize_t generic_write_sync(struct kiocb *iocb, ssize_t count)
|
|||
} else if (iocb->ki_flags & IOCB_DONTCACHE) {
|
||||
struct address_space *mapping = iocb->ki_filp->f_mapping;
|
||||
|
||||
filemap_fdatawrite_range_kick(mapping, iocb->ki_pos - count,
|
||||
filemap_flush_range(mapping, iocb->ki_pos - count,
|
||||
iocb->ki_pos - 1);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ int generic_fadvise(struct file *file, loff_t offset, loff_t len, int advice)
|
|||
spin_unlock(&file->f_lock);
|
||||
break;
|
||||
case POSIX_FADV_DONTNEED:
|
||||
filemap_fdatawrite_range_kick(mapping, offset, endbyte);
|
||||
filemap_flush_range(mapping, offset, endbyte);
|
||||
|
||||
/*
|
||||
* First and last FULL page! Partial pages are deliberately
|
||||
|
|
|
|||
|
|
@ -419,7 +419,7 @@ int filemap_fdatawrite(struct address_space *mapping)
|
|||
EXPORT_SYMBOL(filemap_fdatawrite);
|
||||
|
||||
/**
|
||||
* filemap_fdatawrite_range_kick - start writeback on a range
|
||||
* filemap_flush_range - start writeback on a range
|
||||
* @mapping: target address_space
|
||||
* @start: index to start writeback on
|
||||
* @end: last (inclusive) index for writeback
|
||||
|
|
@ -429,12 +429,12 @@ EXPORT_SYMBOL(filemap_fdatawrite);
|
|||
*
|
||||
* Return: %0 on success, negative error code otherwise.
|
||||
*/
|
||||
int filemap_fdatawrite_range_kick(struct address_space *mapping, loff_t start,
|
||||
int filemap_flush_range(struct address_space *mapping, loff_t start,
|
||||
loff_t end)
|
||||
{
|
||||
return filemap_writeback(mapping, start, end, WB_SYNC_NONE, NULL);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(filemap_fdatawrite_range_kick);
|
||||
EXPORT_SYMBOL_GPL(filemap_flush_range);
|
||||
|
||||
/**
|
||||
* filemap_flush - mostly a non-blocking flush
|
||||
|
|
@ -447,7 +447,7 @@ EXPORT_SYMBOL_GPL(filemap_fdatawrite_range_kick);
|
|||
*/
|
||||
int filemap_flush(struct address_space *mapping)
|
||||
{
|
||||
return filemap_fdatawrite_range_kick(mapping, 0, LLONG_MAX);
|
||||
return filemap_flush_range(mapping, 0, LLONG_MAX);
|
||||
}
|
||||
EXPORT_SYMBOL(filemap_flush);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue