Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=57bf63d69cb6b7064e6fec5e83da4e1918168282
Commit:     57bf63d69cb6b7064e6fec5e83da4e1918168282
Parent:     90675a27fa3eb0e97f1d040b183cceb44316e669
Author:     Dave Kleikamp <[EMAIL PROTECTED]>
AuthorDate: Tue Mar 6 01:42:12 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Mar 6 09:30:25 2007 -0800

    [PATCH] fs: nobh_truncate_page() fix
    
    This fixes a regression caused by 22c8ca78f20724676b6006232bf06cc3e9299539.
    
    nobh_prepare_write() no longer marks the page uptodate, so
    nobh_truncate_page() needs to do it.
    
    Signed-off-by: Dave Kleikamp <[EMAIL PROTECTED]>
    Cc: Nick Piggin <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 fs/buffer.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/fs/buffer.c b/fs/buffer.c
index e8504b6..1d0852f 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -2365,6 +2365,10 @@ failed:
 }
 EXPORT_SYMBOL(nobh_prepare_write);
 
+/*
+ * Make sure any changes to nobh_commit_write() are reflected in
+ * nobh_truncate_page(), since it doesn't call commit_write().
+ */
 int nobh_commit_write(struct file *file, struct page *page,
                unsigned from, unsigned to)
 {
@@ -2466,6 +2470,11 @@ int nobh_truncate_page(struct address_space *mapping, 
loff_t from)
                memset(kaddr + offset, 0, PAGE_CACHE_SIZE - offset);
                flush_dcache_page(page);
                kunmap_atomic(kaddr, KM_USER0);
+               /*
+                * It would be more correct to call aops->commit_write()
+                * here, but this is more efficient.
+                */
+               SetPageUptodate(page);
                set_page_dirty(page);
        }
        unlock_page(page);
-
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  http://vger.kernel.org/majordomo-info.html

Reply via email to