From: Stephen Rothwell Date: Mon, 5 Dec 2011 00:34:57 +0000 (+1100) Subject: Merge remote-tracking branch 'logfs/master' X-Git-Tag: next-20111205~69 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=92b5be9cbb51feb15655cf54494d9a64ec8a53c2;p=karo-tx-linux.git Merge remote-tracking branch 'logfs/master' Conflicts: fs/logfs/file.c --- 92b5be9cbb51feb15655cf54494d9a64ec8a53c2 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; }