All of lore.kernel.org
 help / color / mirror / Atom feed
* [Ocfs2-devel] [PATCH 1/4] ocfs2: fix a typing error in ocfs2_direct_IO_write
@ 2015-02-25  9:28 Joseph Qi
  0 siblings, 0 replies; only message in thread
From: Joseph Qi @ 2015-02-25  9:28 UTC (permalink / raw)
  To: ocfs2-devel

Only when direct IO succeeds we need consider zeroing out in case of
cluster not aligned.

Signed-off-by: Joseph Qi <joseph.qi@huawei.com>
---
 fs/ocfs2/aops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
index 44db180..0c2848a 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);
-- 
1.8.4.3

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-02-25  9:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-25  9:28 [Ocfs2-devel] [PATCH 1/4] ocfs2: fix a typing error in ocfs2_direct_IO_write Joseph Qi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.