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:
Christoph Hellwig 2025-10-24 10:04:21 +02:00 committed by Christian Brauner
parent 45cbce5b88
commit c28d67b33c
No known key found for this signature in database
GPG Key ID: 91C61BC06578DCA2
4 changed files with 9 additions and 10 deletions

View File

@ -285,8 +285,7 @@ int sync_file_range(struct file *file, loff_t offset, loff_t nbytes,
ret = filemap_fdatawrite_range(mapping, offset, ret = filemap_fdatawrite_range(mapping, offset,
endbyte); endbyte);
else else
ret = filemap_fdatawrite_range_kick(mapping, offset, ret = filemap_flush_range(mapping, offset, endbyte);
endbyte);
if (ret < 0) if (ret < 0)
goto out; goto out;
} }

View File

@ -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_check_and_advance_wb_err(struct file *file);
extern int __must_check file_write_and_wait_range(struct file *file, extern int __must_check file_write_and_wait_range(struct file *file,
loff_t start, loff_t end); 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); loff_t end);
static inline int file_write_and_wait(struct file *file) static inline int file_write_and_wait(struct file *file)
@ -3051,8 +3051,8 @@ static inline ssize_t generic_write_sync(struct kiocb *iocb, ssize_t count)
} else if (iocb->ki_flags & IOCB_DONTCACHE) { } else if (iocb->ki_flags & IOCB_DONTCACHE) {
struct address_space *mapping = iocb->ki_filp->f_mapping; 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); iocb->ki_pos - 1);
} }
return count; return count;

View File

@ -111,7 +111,7 @@ int generic_fadvise(struct file *file, loff_t offset, loff_t len, int advice)
spin_unlock(&file->f_lock); spin_unlock(&file->f_lock);
break; break;
case POSIX_FADV_DONTNEED: 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 * First and last FULL page! Partial pages are deliberately

View File

@ -419,7 +419,7 @@ int filemap_fdatawrite(struct address_space *mapping)
EXPORT_SYMBOL(filemap_fdatawrite); 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 * @mapping: target address_space
* @start: index to start writeback on * @start: index to start writeback on
* @end: last (inclusive) index for writeback * @end: last (inclusive) index for writeback
@ -429,12 +429,12 @@ EXPORT_SYMBOL(filemap_fdatawrite);
* *
* Return: %0 on success, negative error code otherwise. * 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) loff_t end)
{ {
return filemap_writeback(mapping, start, end, WB_SYNC_NONE, NULL); 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 * 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) 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); EXPORT_SYMBOL(filemap_flush);