Skip to content

Commit

Permalink
fs: kill sync_inode
Browse files Browse the repository at this point in the history
Now that all users of sync_inode() have been deleted, remove
sync_inode().

Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
  • Loading branch information
Josef Bacik authored and David Sterba committed Aug 23, 2021
1 parent 25d23cd commit 5662c96
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
19 changes: 1 addition & 18 deletions fs/fs-writeback.c
Original file line number Diff line number Diff line change
Expand Up @@ -2729,23 +2729,6 @@ int write_inode_now(struct inode *inode, int sync)
}
EXPORT_SYMBOL(write_inode_now);

/**
* sync_inode - write an inode and its pages to disk.
* @inode: the inode to sync
* @wbc: controls the writeback mode
*
* sync_inode() will write an inode and its pages to disk. It will also
* correctly update the inode on its superblock's dirty inode lists and will
* update inode->i_state.
*
* The caller must have a ref on the inode.
*/
int sync_inode(struct inode *inode, struct writeback_control *wbc)
{
return writeback_single_inode(inode, wbc);
}
EXPORT_SYMBOL(sync_inode);

/**
* sync_inode_metadata - write an inode to disk
* @inode: the inode to sync
Expand All @@ -2762,6 +2745,6 @@ int sync_inode_metadata(struct inode *inode, int wait)
.nr_to_write = 0, /* metadata-only */
};

return sync_inode(inode, &wbc);
return writeback_single_inode(inode, &wbc);
}
EXPORT_SYMBOL(sync_inode_metadata);
1 change: 0 additions & 1 deletion include/linux/fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -2457,7 +2457,6 @@ static inline void file_accessed(struct file *file)

extern int file_modified(struct file *file);

int sync_inode(struct inode *inode, struct writeback_control *wbc);
int sync_inode_metadata(struct inode *inode, int wait);

struct file_system_type {
Expand Down

0 comments on commit 5662c96

Please sign in to comment.