Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 44862
b: refs/heads/master
c: 3e67c09
h: refs/heads/master
v: v3
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Dec 21, 2006
1 parent ee5fda3 commit 7540ea6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 921320210bd2ec4f17053d283355b73048ac0e56
refs/heads/master: 3e67c0987d7567ad666641164a153dca9a43b11d
9 changes: 5 additions & 4 deletions trunk/mm/truncate.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,12 @@ 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) {
dec_zone_page_state(page, NR_FILE_DIRTY);
task_io_account_cancelled_write(account_size);
}
}


/*
* If truncate cannot remove the fs-private metadata from the page, the page
* becomes anonymous. It will be left on the LRU and may even be mapped into
Expand All @@ -81,11 +82,11 @@ truncate_complete_page(struct address_space *mapping, struct page *page)
if (page->mapping != mapping)
return;

cancel_dirty_page(page, PAGE_CACHE_SIZE);

if (PagePrivate(page))
do_invalidatepage(page, 0);

cancel_dirty_page(page, PAGE_CACHE_SIZE);

ClearPageUptodate(page);
ClearPageMappedToDisk(page);
remove_from_page_cache(page);
Expand Down

0 comments on commit 7540ea6

Please sign in to comment.