From: Mark Fasheh Date: Wed, 16 Nov 2011 20:03:10 +0000 (-0800) Subject: ocfs2: honor O_(D)SYNC flag in fallocate X-Git-Tag: MMI-PSA29.97-13-9~17941^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=df295d4a4b3c98af1a2445a82aef169e7e5d96b8;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git ocfs2: honor O_(D)SYNC flag in fallocate We need to sync the transaction which updates i_size if the file is marked as needing sync semantics. Signed-off-by: Mark Fasheh Signed-off-by: Joel Becker --- diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 5c4a74e04ab4..09e3de57cdee 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -1950,6 +1950,9 @@ static int __ocfs2_change_file_space(struct file *file, struct inode *inode, if (ret < 0) mlog_errno(ret); + if (file->f_flags & O_SYNC) + handle->h_sync = 1; + ocfs2_commit_trans(osb, handle); out_inode_unlock: