Skip to content

Commit

Permalink
ocfs2: honor O_(D)SYNC flag in fallocate
Browse files Browse the repository at this point in the history
We need to sync the transaction which updates i_size if the file is marked
as needing sync semantics.

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
Signed-off-by: Joel Becker <jlbec@evilplan.org>
  • Loading branch information
Mark Fasheh authored and Joel Becker committed Nov 17, 2011
1 parent 0393afe commit df295d4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fs/ocfs2/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit df295d4

Please sign in to comment.