GIT: unionfs2-2.6.27.y: Unionfs: clear partial read in readpage
Erez Zadok
ezk at fsl.cs.sunysb.edu
Thu Aug 12 23:17:23 EDT 2010
commit 1370aecac49ee8bb19da6b807fc6308c44d47774
Author: Erez Zadok <ezk at cs.sunysb.edu>
Date: Fri Nov 9 10:27:32 2007 -0500
Unionfs: clear partial read in readpage
Signed-off-by: Hugh Dickins <hugh at veritas.com>
Signed-off-by: Erez Zadok <ezk at cs.sunysb.edu>
diff --git a/fs/unionfs/mmap.c b/fs/unionfs/mmap.c
index 468dc61..bb00fd5 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)
More information about the unionfs-cvs
mailing list