mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-22 23:13:01 +02:00
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:
parent
1404580279
commit
8b12017c1b
|
@ -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.
|
||||
*/
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue
Block a user