From: Stephen Rothwell Date: Wed, 7 Dec 2011 00:36:21 +0000 (+1100) Subject: Merge remote-tracking branch 'logfs/master' X-Git-Tag: next-20111207~69 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=2f6df89b2a11d51948106355e750251db68c4eeb;p=karo-tx-linux.git Merge remote-tracking branch 'logfs/master' Conflicts: fs/logfs/file.c --- 2f6df89b2a11d51948106355e750251db68c4eeb diff --cc fs/logfs/file.c index b548c87a86f1,f85d603fdffa..3886cded283c --- a/fs/logfs/file.c +++ b/fs/logfs/file.c @@@ -219,20 -219,13 +219,22 @@@ long logfs_ioctl(struct file *file, uns } } -int logfs_fsync(struct file *file, int datasync) +int logfs_fsync(struct file *file, loff_t start, loff_t end, int datasync) { struct super_block *sb = file->f_mapping->host->i_sb; + struct inode *inode = file->f_mapping->host; + int ret; + + ret = filemap_write_and_wait_range(inode->i_mapping, start, end); + if (ret) + return ret; + mutex_lock(&inode->i_mutex); + logfs_get_wblocks(sb, NULL, WF_LOCK); logfs_write_anchor(sb); + logfs_put_wblocks(sb, NULL, WF_LOCK); + mutex_unlock(&inode->i_mutex); + return 0; }