Commit d162eaad authored by Norton.Zhu's avatar Norton.Zhu Committed by Linus Torvalds

ocfs2_direct_IO_write() misses ocfs2_is_overwrite() error code

If ocfs2_is_overwrite failed, ocfs2_direct_IO_write mays till return
success to the caller.
Signed-off-by: default avatarNorton.Zhu <>
Cc: Mark Fasheh <>
Cc: Joel Becker <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent ce4f2fd7
......@@ -864,6 +864,7 @@ static ssize_t ocfs2_direct_IO_write(struct kiocb *iocb,
is_overwrite = ocfs2_is_overwrite(osb, inode, offset);
if (is_overwrite < 0) {
ret = is_overwrite;
ocfs2_inode_unlock(inode, 1);
goto clean_orphan;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment