Skip to content

Commit df295d4

Browse files
Mark Fashehjlbec
authored andcommitted
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 <[email protected]> Signed-off-by: Joel Becker <[email protected]>
1 parent 0393afe commit df295d4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fs/ocfs2/file.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1950,6 +1950,9 @@ static int __ocfs2_change_file_space(struct file *file, struct inode *inode,
19501950
if (ret < 0)
19511951
mlog_errno(ret);
19521952

1953+
if (file->f_flags & O_SYNC)
1954+
handle->h_sync = 1;
1955+
19531956
ocfs2_commit_trans(osb, handle);
19541957

19551958
out_inode_unlock:

0 commit comments

Comments
 (0)