]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: zero page past end of inline file items
authorChris Mason <chris.mason@oracle.com>
Fri, 11 Sep 2009 16:36:29 +0000 (12:36 -0400)
committerChris Mason <chris.mason@oracle.com>
Fri, 11 Sep 2009 17:31:08 +0000 (13:31 -0400)
commitee9ec4d9507505174ecf0c17d59b47271f84631f
tree4b059485eb226291dac336921b32653131b0dd43
parent62d9392a887c536566ac5583b84e72939baa3a0e
Btrfs: zero page past end of inline file items

When btrfs_get_extent is reading inline file items for readpage,
it needs to copy the inline extent into the page.  If the
inline extent doesn't cover all of the page, that means there
is a hole in the file, or that our file is smaller than one
page.

readpage does zeroing for the case where the file is smaller than one
page, but nobody is currently zeroing for the case where there is
a hole after the inline item.

This commit changes btrfs_get_extent to zero fill the page past
the end of the inline item.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/inode.c