Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5f2a105d5e33a038a717995d2738434f9c25aed2
Commit:     5f2a105d5e33a038a717995d2738434f9c25aed2
Parent:     bb4067e34159648d394943d5e2a011f838bff22f
Author:     Andrew Morton <[EMAIL PROTECTED]>
AuthorDate: Fri Dec 22 01:04:48 2006 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Dec 22 08:55:45 2006 -0800

    [PATCH] truncate: dirty memory accounting fix
    
    Only (un)account for IO and page-dirtying for devices which have real 
backing
    store (ie: not tmpfs or ramdisks).
    
    Cc: "David S. Miller" <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 mm/truncate.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/mm/truncate.c b/mm/truncate.c
index 89a5c35..4a38dd1 100644
--- a/mm/truncate.c
+++ b/mm/truncate.c
@@ -60,7 +60,8 @@ void cancel_dirty_page(struct page *page, unsigned int 
account_size)
                WARN_ON(++warncount < 5);
        }
                
-       if (TestClearPageDirty(page) && account_size) {
+       if (TestClearPageDirty(page) && account_size &&
+                       mapping_cap_account_dirty(page->mapping)) {
                dec_zone_page_state(page, NR_FILE_DIRTY);
                task_io_account_cancelled_write(account_size);
        }
-
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