diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 318b73d791d587347457a57a2ea661e9e1929cdc..ec0e67e9a3eceee5f6f284501a455033330a8f55 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -1940,6 +1940,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 */