diff options
Diffstat (limited to 'fs/logfs/file.c')
-rw-r--r-- | fs/logfs/file.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/fs/logfs/file.c b/fs/logfs/file.c index c2ad7028def4..b548c87a86f1 100644 --- a/fs/logfs/file.c +++ b/fs/logfs/file.c | |||
@@ -219,11 +219,20 @@ long logfs_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
219 | } | 219 | } |
220 | } | 220 | } |
221 | 221 | ||
222 | int logfs_fsync(struct file *file, int datasync) | 222 | int logfs_fsync(struct file *file, loff_t start, loff_t end, int datasync) |
223 | { | 223 | { |
224 | struct super_block *sb = file->f_mapping->host->i_sb; | 224 | struct super_block *sb = file->f_mapping->host->i_sb; |
225 | struct inode *inode = file->f_mapping->host; | ||
226 | int ret; | ||
227 | |||
228 | ret = filemap_write_and_wait_range(inode->i_mapping, start, end); | ||
229 | if (ret) | ||
230 | return ret; | ||
225 | 231 | ||
232 | mutex_lock(&inode->i_mutex); | ||
226 | logfs_write_anchor(sb); | 233 | logfs_write_anchor(sb); |
234 | mutex_unlock(&inode->i_mutex); | ||
235 | |||
227 | return 0; | 236 | return 0; |
228 | } | 237 | } |
229 | 238 | ||