diff options
author | Joseph Qi <joseph.qi@huawei.com> | 2015-04-14 18:43:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-14 19:48:57 -0400 |
commit | bdd86215b393b743be34b854299c6cda7cbb361c (patch) | |
tree | b20472a25f4e5aaf0bfe5990783e0c0511733220 /fs/ocfs2 | |
parent | 7a8346429d6da4039a4687a8a07f3f8cdaf96d92 (diff) |
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 <joseph.qi@huawei.com>
Cc: Mark Fasheh <mfasheh@suse.com>
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')
-rw-r--r-- | fs/ocfs2/aops.c | 2 |
1 files changed, 1 insertions, 1 deletions
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, | |||
771 | if (ret < 0) | 771 | if (ret < 0) |
772 | mlog_errno(ret); | 772 | mlog_errno(ret); |
773 | } | 773 | } |
774 | } else if (written < 0 && append_write && !is_overwrite && | 774 | } else if (written > 0 && append_write && !is_overwrite && |
775 | !cluster_align) { | 775 | !cluster_align) { |
776 | u32 p_cpos = 0; | 776 | u32 p_cpos = 0; |
777 | u32 v_cpos = ocfs2_bytes_to_clusters(osb->sb, offset); | 777 | u32 v_cpos = ocfs2_bytes_to_clusters(osb->sb, offset); |