提交 bdd86215 编写于 作者: J Joseph Qi 提交者: Linus Torvalds

ocfs2: fix a typing error in ocfs2_direct_IO_write

Only when direct IO succeeds we need consider zeroing out in case of
cluster not aligned.
Signed-off-by: NJoseph Qi <joseph.qi@huawei.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 7a834642
...@@ -771,7 +771,7 @@ static ssize_t ocfs2_direct_IO_write(struct kiocb *iocb, ...@@ -771,7 +771,7 @@ static ssize_t ocfs2_direct_IO_write(struct kiocb *iocb,
if (ret < 0) if (ret < 0)
mlog_errno(ret); mlog_errno(ret);
} }
} else if (written < 0 && append_write && !is_overwrite && } else if (written > 0 && append_write && !is_overwrite &&
!cluster_align) { !cluster_align) {
u32 p_cpos = 0; u32 p_cpos = 0;
u32 v_cpos = ocfs2_bytes_to_clusters(osb->sb, offset); u32 v_cpos = ocfs2_bytes_to_clusters(osb->sb, offset);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册