mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
pass writeback_control to ->write_inode
This gives the filesystem more information about the writeback that is happening. Trond requested this for the NFS unstable write handling, and other filesystems might benefit from this too by beeing able to distinguish between the different callers in more detail. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
26821ed40b
commit
a9185b41a4
45 changed files with 115 additions and 72 deletions
|
|
@ -118,7 +118,7 @@ extern unsigned long ext2_count_free (struct buffer_head *, unsigned);
|
|||
|
||||
/* inode.c */
|
||||
extern struct inode *ext2_iget (struct super_block *, unsigned long);
|
||||
extern int ext2_write_inode (struct inode *, int);
|
||||
extern int ext2_write_inode (struct inode *, struct writeback_control *);
|
||||
extern void ext2_delete_inode (struct inode *);
|
||||
extern int ext2_sync_inode (struct inode *);
|
||||
extern int ext2_get_block(struct inode *, sector_t, struct buffer_head *, int);
|
||||
|
|
|
|||
|
|
@ -41,6 +41,8 @@ MODULE_AUTHOR("Remy Card and others");
|
|||
MODULE_DESCRIPTION("Second Extended Filesystem");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
static int __ext2_write_inode(struct inode *inode, int do_sync);
|
||||
|
||||
/*
|
||||
* Test whether an inode is a fast symlink.
|
||||
*/
|
||||
|
|
@ -64,7 +66,7 @@ void ext2_delete_inode (struct inode * inode)
|
|||
goto no_delete;
|
||||
EXT2_I(inode)->i_dtime = get_seconds();
|
||||
mark_inode_dirty(inode);
|
||||
ext2_write_inode(inode, inode_needs_sync(inode));
|
||||
__ext2_write_inode(inode, inode_needs_sync(inode));
|
||||
|
||||
inode->i_size = 0;
|
||||
if (inode->i_blocks)
|
||||
|
|
@ -1335,7 +1337,7 @@ bad_inode:
|
|||
return ERR_PTR(ret);
|
||||
}
|
||||
|
||||
int ext2_write_inode(struct inode *inode, int do_sync)
|
||||
static int __ext2_write_inode(struct inode *inode, int do_sync)
|
||||
{
|
||||
struct ext2_inode_info *ei = EXT2_I(inode);
|
||||
struct super_block *sb = inode->i_sb;
|
||||
|
|
@ -1440,6 +1442,11 @@ int ext2_write_inode(struct inode *inode, int do_sync)
|
|||
return err;
|
||||
}
|
||||
|
||||
int ext2_write_inode(struct inode *inode, struct writeback_control *wbc)
|
||||
{
|
||||
return __ext2_write_inode(inode, wbc->sync_mode == WB_SYNC_ALL);
|
||||
}
|
||||
|
||||
int ext2_sync_inode(struct inode *inode)
|
||||
{
|
||||
struct writeback_control wbc = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue