diff options
author | Norton.Zhu <norton.zhu@huawei.com> | 2015-11-05 21:43:52 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-05 22:34:48 -0500 |
commit | d162eaad7726e5f10a2b5813bdfac9d55c8eba69 (patch) | |
tree | 1b2813ce95159ad838a02bd5e5d6e5b9c7255e74 /fs/ocfs2/aops.c | |
parent | ce4f2fd7eacd84d78530fb97621621ae50d167f1 (diff) |
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: Norton.Zhu <norton.zhu@huawei.com>
Cc: Mark Fasheh <mfasheh@suse.de>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ocfs2/aops.c')
-rw-r--r-- | fs/ocfs2/aops.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index 64b11d90eca6..f04914cc19a4 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c | |||
@@ -864,6 +864,7 @@ static ssize_t ocfs2_direct_IO_write(struct kiocb *iocb, | |||
864 | is_overwrite = ocfs2_is_overwrite(osb, inode, offset); | 864 | is_overwrite = ocfs2_is_overwrite(osb, inode, offset); |
865 | if (is_overwrite < 0) { | 865 | if (is_overwrite < 0) { |
866 | mlog_errno(is_overwrite); | 866 | mlog_errno(is_overwrite); |
867 | ret = is_overwrite; | ||
867 | ocfs2_inode_unlock(inode, 1); | 868 | ocfs2_inode_unlock(inode, 1); |
868 | goto clean_orphan; | 869 | goto clean_orphan; |
869 | } | 870 | } |