Skip to contentSkip to conversation

ocfs2: fix a typing error in ocfs2_direct_IO_write

PATCH New Joseph Qi 1 participant 1 message Feb 25, 2015 OCFS2

lore
Share & tools
lore

Joseph Qi

author
#0 lore raw

PATCH 1/4 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.

---
 fs/ocfs2/aops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ocfs2/aops.c +1 -1
index 44db180..0c2848a 100644
@@ -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);
Signature · 1 line
1.8.4.3