commit 2f6e1f07c84184e7b4cdb88ec920e6bada7f051e
Author: Erez Zadok <[EMAIL PROTECTED]>
Date:   Mon Nov 12 20:45:43 2007 -0500

    Unionfs: clear partial read in readpage
    
    Signed-off-by: Hugh Dickins <[EMAIL PROTECTED]>
    Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>

diff --git a/fs/unionfs/mmap.c b/fs/unionfs/mmap.c
index 24fa02d..e5d7e99 100644
--- a/fs/unionfs/mmap.c
+++ b/fs/unionfs/mmap.c
@@ -211,7 +211,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)
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs

Reply via email to