From: Joseph Qi Date: Tue, 7 Apr 2015 23:43:52 +0000 (+1000) Subject: ocfs2: fix a typing error in ocfs2_direct_IO_write X-Git-Tag: KARO-TXA5-2015-06-26~18^2~486 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=78da9ff1c56a621a398e93b6139e1b404af8e428;p=karo-tx-linux.git 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: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Signed-off-by: Andrew Morton --- diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index 44db1808cdb5..0c2848a599c9 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c @@ -771,7 +771,7 @@ static ssize_t ocfs2_direct_IO_write(struct kiocb *iocb, if (ret < 0) mlog_errno(ret); } - } else if (written < 0 && append_write && !is_overwrite && + } else if (written > 0 && append_write && !is_overwrite && !cluster_align) { u32 p_cpos = 0; u32 v_cpos = ocfs2_bytes_to_clusters(osb->sb, offset);