Commit:     d4c5cdb3e099da7cc64df622b02ff7659babe16e
Parent:     e10f281bca03f45bdec91e67645c394eaec2f8f6
Author:     Michael Halcrow <[EMAIL PROTECTED]>
AuthorDate: Wed Jun 27 14:09:45 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Thu Jun 28 11:34:53 2007 -0700

    zero out last page for llseek/write
    When one llseek's past the end of the file and then writes, every page past
    the previous end of the file should be cleared.  Trevor found that the code,
    as is, does not assure that the very last page is always cleared.  This 
    takes care of that.
    Signed-off-by: Michael Halcrow <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 fs/ecryptfs/mmap.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/fs/ecryptfs/mmap.c b/fs/ecryptfs/mmap.c
index 6df410c..7d5a43c 100644
--- a/fs/ecryptfs/mmap.c
+++ b/fs/ecryptfs/mmap.c
@@ -422,6 +422,8 @@ static int ecryptfs_prepare_write(struct file *file, struct 
page *page,
                                goto out;
+               if (end_of_prev_pg_pos + 1 > i_size_read(page->mapping->host))
+                       zero_user_page(page, 0, PAGE_CACHE_SIZE, KM_USER0);
        return rc;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to