fs/ntfs3: Remove unused ntfs_flush_inodes

ntfs_flush_inodes() was added in 2021 by
commit 82cae269cf ("fs/ntfs3: Add initialization of super block")
but has remained unused.

Remove it, and it's helper function.

Note: There is a commented out call to ntfs_flush_inodes in
ntfs_truncate() - I've left that in place.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
This commit is contained in:
Dr. David Alan Gilbert 2025-02-19 01:45:56 +00:00 committed by Konstantin Komarov
parent 1404580279
commit 8b12017c1b
No known key found for this signature in database
GPG Key ID: A9B0331F832407B6
2 changed files with 0 additions and 42 deletions

View File

@ -1024,46 +1024,6 @@ int ntfs_sync_inode(struct inode *inode)
return _ni_write_inode(inode, 1);
}
/*
* writeback_inode - Helper function for ntfs_flush_inodes().
*
* This writes both the inode and the file data blocks, waiting
* for in flight data blocks before the start of the call. It
* does not wait for any io started during the call.
*/
static int writeback_inode(struct inode *inode)
{
int ret = sync_inode_metadata(inode, 0);
if (!ret)
ret = filemap_fdatawrite(inode->i_mapping);
return ret;
}
/*
* ntfs_flush_inodes
*
* Write data and metadata corresponding to i1 and i2. The io is
* started but we do not wait for any of it to finish.
*
* filemap_flush() is used for the block device, so if there is a dirty
* page for a block already in flight, we will not wait and start the
* io over again.
*/
int ntfs_flush_inodes(struct super_block *sb, struct inode *i1,
struct inode *i2)
{
int ret = 0;
if (i1)
ret = writeback_inode(i1);
if (!ret && i2)
ret = writeback_inode(i2);
if (!ret)
ret = filemap_flush(sb->s_bdev_file->f_mapping);
return ret;
}
/*
* Helper function to read file.
*/

View File

@ -713,8 +713,6 @@ int ntfs_write_end(struct file *file, struct address_space *mapping, loff_t pos,
u32 len, u32 copied, struct folio *folio, void *fsdata);
int ntfs3_write_inode(struct inode *inode, struct writeback_control *wbc);
int ntfs_sync_inode(struct inode *inode);
int ntfs_flush_inodes(struct super_block *sb, struct inode *i1,
struct inode *i2);
int inode_read_data(struct inode *inode, void *data, size_t bytes);
int ntfs_create_inode(struct mnt_idmap *idmap, struct inode *dir,
struct dentry *dentry, const struct cpu_str *uni,