mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -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
|
|
@ -1120,7 +1120,7 @@ static int ubifs_rename(struct inode *old_dir, struct dentry *old_dentry,
|
|||
if (release)
|
||||
ubifs_release_budget(c, &ino_req);
|
||||
if (IS_SYNC(old_inode))
|
||||
err = old_inode->i_sb->s_op->write_inode(old_inode, 1);
|
||||
err = old_inode->i_sb->s_op->write_inode(old_inode, NULL);
|
||||
return err;
|
||||
|
||||
out_cancel:
|
||||
|
|
|
|||
|
|
@ -1011,7 +1011,7 @@ static int ubifs_writepage(struct page *page, struct writeback_control *wbc)
|
|||
/* Is the page fully inside @i_size? */
|
||||
if (page->index < end_index) {
|
||||
if (page->index >= synced_i_size >> PAGE_CACHE_SHIFT) {
|
||||
err = inode->i_sb->s_op->write_inode(inode, 1);
|
||||
err = inode->i_sb->s_op->write_inode(inode, NULL);
|
||||
if (err)
|
||||
goto out_unlock;
|
||||
/*
|
||||
|
|
@ -1039,7 +1039,7 @@ static int ubifs_writepage(struct page *page, struct writeback_control *wbc)
|
|||
kunmap_atomic(kaddr, KM_USER0);
|
||||
|
||||
if (i_size > synced_i_size) {
|
||||
err = inode->i_sb->s_op->write_inode(inode, 1);
|
||||
err = inode->i_sb->s_op->write_inode(inode, NULL);
|
||||
if (err)
|
||||
goto out_unlock;
|
||||
}
|
||||
|
|
@ -1242,7 +1242,7 @@ static int do_setattr(struct ubifs_info *c, struct inode *inode,
|
|||
if (release)
|
||||
ubifs_release_budget(c, &req);
|
||||
if (IS_SYNC(inode))
|
||||
err = inode->i_sb->s_op->write_inode(inode, 1);
|
||||
err = inode->i_sb->s_op->write_inode(inode, NULL);
|
||||
return err;
|
||||
|
||||
out:
|
||||
|
|
@ -1316,7 +1316,7 @@ int ubifs_fsync(struct file *file, struct dentry *dentry, int datasync)
|
|||
* the inode unless this is a 'datasync()' call.
|
||||
*/
|
||||
if (!datasync || (inode->i_state & I_DIRTY_DATASYNC)) {
|
||||
err = inode->i_sb->s_op->write_inode(inode, 1);
|
||||
err = inode->i_sb->s_op->write_inode(inode, NULL);
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -283,7 +283,7 @@ static void ubifs_destroy_inode(struct inode *inode)
|
|||
/*
|
||||
* Note, Linux write-back code calls this without 'i_mutex'.
|
||||
*/
|
||||
static int ubifs_write_inode(struct inode *inode, int wait)
|
||||
static int ubifs_write_inode(struct inode *inode, struct writeback_control *wbc)
|
||||
{
|
||||
int err = 0;
|
||||
struct ubifs_info *c = inode->i_sb->s_fs_info;
|
||||
|
|
|
|||
Loading…
Reference in a new issue