ocfs2: Initialize the cluster we're writing to in a non-sparse extend
commit9baf278cca4043a1312f3a40bf17b979b6238ebc
authorSunil Mushran <sunil.mushran@oracle.com>
Thu, 6 Aug 2009 23:12:58 +0000 (6 16:12 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 9 Sep 2009 03:33:52 +0000 (8 20:33 -0700)
treed14aa8573625d13aba31d2c22d95201ebb6e858a
parent8c668814e3e2be7d633447bf6e78237d4cedabb7
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