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

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

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 <norton.zhu@huawei.com>
Cc: Mark Fasheh <mfasheh@suse.de>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent ce4f2fd7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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) {
			mlog_errno(is_overwrite);
			ret = is_overwrite;
			ocfs2_inode_unlock(inode, 1);
			goto clean_orphan;
		}