Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 45013
b: refs/heads/master
c: 8368e32
h: refs/heads/master
i:
  45011: 8e8a6ee
v: v3
  • Loading branch information
Linus Torvalds committed Dec 23, 2006
1 parent bc7355d commit 06e4650
Show file tree
Hide file tree
Showing 2 changed files with 9 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: 18ed1c051317ac3a685120cead2adb192b802347
refs/heads/master: 8368e328dfe1c534957051333a87b3210a12743b
12 changes: 8 additions & 4 deletions trunk/mm/truncate.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,16 @@ void cancel_dirty_page(struct page *page, unsigned int account_size)
WARN_ON(++warncount < 5);
}

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);
if (TestClearPageDirty(page)) {
struct address_space *mapping = page->mapping;
if (mapping && mapping_cap_account_dirty(mapping)) {
dec_zone_page_state(page, NR_FILE_DIRTY);
if (account_size)
task_io_account_cancelled_write(account_size);
}
}
}
EXPORT_SYMBOL(cancel_dirty_page);

/*
* If truncate cannot remove the fs-private metadata from the page, the page
Expand Down

0 comments on commit 06e4650

Please sign in to comment.