diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-02-28 08:03:10 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-02-28 08:03:10 +0100 |
commit | 5838d18955b52467f4b30486e62a31727b39998d (patch) | |
tree | 8aeb8412156bab93a6b39f2de4a8d6c912ddb31a /fs/sync.c | |
parent | 579deee571a755c485ad702ef82c77a98a2ccc05 (diff) | |
parent | 895c8b7b4623d4f55e260e5dee2574b4f7113105 (diff) | |
download | linux-stable-5838d18955b52467f4b30486e62a31727b39998d.tar.gz linux-stable-5838d18955b52467f4b30486e62a31727b39998d.tar.bz2 linux-stable-5838d18955b52467f4b30486e62a31727b39998d.zip |
Merge branch 'linus' into x86/urgent, to merge dependent patch
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'fs/sync.c')
-rw-r--r-- | fs/sync.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/sync.c b/fs/sync.c index 01d9f18a70b5..fbc98ee62044 100644 --- a/fs/sync.c +++ b/fs/sync.c @@ -177,8 +177,16 @@ SYSCALL_DEFINE1(syncfs, int, fd) */ int vfs_fsync_range(struct file *file, loff_t start, loff_t end, int datasync) { + struct inode *inode = file->f_mapping->host; + if (!file->f_op->fsync) return -EINVAL; + if (!datasync && (inode->i_state & I_DIRTY_TIME)) { + spin_lock(&inode->i_lock); + inode->i_state &= ~I_DIRTY_TIME; + spin_unlock(&inode->i_lock); + mark_inode_dirty_sync(inode); + } return file->f_op->fsync(file, start, end, datasync); } EXPORT_SYMBOL(vfs_fsync_range); |