Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit df295d4a authored by Mark Fasheh's avatar Mark Fasheh Committed by Joel Becker
Browse files

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: default avatarMark Fasheh <mfasheh@suse.de>
Signed-off-by: default avatarJoel Becker <jlbec@evilplan.org>
parent 0393afea
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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: