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
|
|
@ -1545,7 +1545,7 @@ static int ntfs_dir_fsync(struct file *filp, struct dentry *dentry,
|
|||
write_inode_now(bmp_vi, !datasync);
|
||||
iput(bmp_vi);
|
||||
}
|
||||
ret = ntfs_write_inode(vi, 1);
|
||||
ret = __ntfs_write_inode(vi, 1);
|
||||
write_inode_now(vi, !datasync);
|
||||
err = sync_blockdev(vi->i_sb->s_bdev);
|
||||
if (unlikely(err && !ret))
|
||||
|
|
|
|||
|
|
@ -2182,7 +2182,7 @@ static int ntfs_file_fsync(struct file *filp, struct dentry *dentry,
|
|||
ntfs_debug("Entering for inode 0x%lx.", vi->i_ino);
|
||||
BUG_ON(S_ISDIR(vi->i_mode));
|
||||
if (!datasync || !NInoNonResident(NTFS_I(vi)))
|
||||
ret = ntfs_write_inode(vi, 1);
|
||||
ret = __ntfs_write_inode(vi, 1);
|
||||
write_inode_now(vi, !datasync);
|
||||
/*
|
||||
* NOTE: If we were to use mapping->private_list (see ext2 and
|
||||
|
|
|
|||
|
|
@ -2957,7 +2957,7 @@ out:
|
|||
*
|
||||
* Return 0 on success and -errno on error.
|
||||
*/
|
||||
int ntfs_write_inode(struct inode *vi, int sync)
|
||||
int __ntfs_write_inode(struct inode *vi, int sync)
|
||||
{
|
||||
sle64 nt;
|
||||
ntfs_inode *ni = NTFS_I(vi);
|
||||
|
|
|
|||
|
|
@ -307,12 +307,12 @@ extern void ntfs_truncate_vfs(struct inode *vi);
|
|||
|
||||
extern int ntfs_setattr(struct dentry *dentry, struct iattr *attr);
|
||||
|
||||
extern int ntfs_write_inode(struct inode *vi, int sync);
|
||||
extern int __ntfs_write_inode(struct inode *vi, int sync);
|
||||
|
||||
static inline void ntfs_commit_inode(struct inode *vi)
|
||||
{
|
||||
if (!is_bad_inode(vi))
|
||||
ntfs_write_inode(vi, 1);
|
||||
__ntfs_write_inode(vi, 1);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@
|
|||
#include "dir.h"
|
||||
#include "debug.h"
|
||||
#include "index.h"
|
||||
#include "inode.h"
|
||||
#include "aops.h"
|
||||
#include "layout.h"
|
||||
#include "malloc.h"
|
||||
|
|
@ -2662,6 +2663,13 @@ static int ntfs_statfs(struct dentry *dentry, struct kstatfs *sfs)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef NTFS_RW
|
||||
static int ntfs_write_inode(struct inode *vi, struct writeback_control *wbc)
|
||||
{
|
||||
return __ntfs_write_inode(vi, wbc->sync_mode == WB_SYNC_ALL);
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* The complete super operations.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue