From: Erez Zadok Date: Fri, 9 Nov 2007 15:27:32 +0000 (-0500) Subject: Unionfs: clear partial read in readpage X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=fe30243105c8990285a649bdb881da83be75e091;p=unionfs-3.11.y.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 468dc61b9cb..bb00fd50197 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)