diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 60b7098f7a11..d8924de8da27 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -1946,6 +1946,8 @@ static int __ocfs2_change_file_space(struct file *file, struct inode *inode, inode_lock(inode); + /* Wait all existing dio workers, newcomers will block on i_rwsem */ + inode_dio_wait(inode); /* * This prevents concurrent writes on other nodes */