ocfs2: Initialize the cluster we're writing to in a non-sparse extend
authorSunil Mushran <sunil.mushran@oracle.com>
Thu, 6 Aug 2009 23:12:58 +0000 (16:12 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 9 Sep 2009 03:17:43 +0000 (20:17 -0700)
commit8338941200d9188e3c866dd16cc2848754947895
treeff8020af394dfe073fbf2a22681311605bfb9a4e
parent7e8287379470a7c18153be389c9516e31ae141f3
ocfs2: Initialize the cluster we're writing to in a non-sparse extend

commit e7432675f8ca868a4af365759a8d4c3779a3d922 upstream.

In a non-sparse extend, we correctly allocate (and zero) the clusters between
the old_i_size and pos, but we don't zero the portions of the cluster we're
writing to outside of pos<->len.

It handles clustersize > pagesize and blocksize < pagesize.

[Cleaned up by Joel Becker.]

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/ocfs2/aops.c