From: Erez Zadok Date: Fri, 16 Nov 2007 18:45:10 +0000 (-0500) Subject: Unionfs: clear partial read in readpage X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=e182ae6f5a3f26531776766688a3eac5872e360e;p=unionfs-odf.git Unionfs: clear partial read in readpage Signed-off-by: Hugh Dickins Signed-off-by: Erez Zadok --- diff --git a/fs/unionfs/mmap.c b/fs/unionfs/mmap.c index 468dc61b9c..bb00fd5019 100644 --- a/fs/unionfs/mmap.c +++ b/fs/unionfs/mmap.c @@ -178,7 +178,8 @@ static int unionfs_do_readpage(struct file *file, struct page *page) err = vfs_read(lower_file, page_data, PAGE_CACHE_SIZE, &lower_file->f_pos); set_fs(old_fs); - + if (err >= 0 && err < PAGE_CACHE_SIZE) + memset(page_data + err, 0, PAGE_CACHE_SIZE - err); kunmap(page); if (err < 0)