Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 43965
b: refs/heads/master
c: e08748c
h: refs/heads/master
i:
  43963: 69149c5
v: v3
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Dec 10, 2006
1 parent 1e210f7 commit 8535302
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 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: 55e829af06681e5d731c03ba04febbd1c76ca293
refs/heads/master: e08748ce01e02f0ec154b141f392ccb9555333f4
7 changes: 6 additions & 1 deletion trunk/fs/buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -2853,8 +2853,13 @@ int try_to_free_buffers(struct page *page)
* could encounter a non-uptodate page, which is unresolvable.
* This only applies in the rare case where try_to_free_buffers
* succeeds but the page is not freed.
*
* Also, during truncate, discard_buffer will have marked all
* the page's buffers clean. We discover that here and clean
* the page also.
*/
clear_page_dirty(page);
if (test_clear_page_dirty(page))
task_io_account_cancelled_write(PAGE_CACHE_SIZE);
}
out:
if (buffers_to_free) {
Expand Down
4 changes: 3 additions & 1 deletion trunk/mm/truncate.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <linux/module.h>
#include <linux/pagemap.h>
#include <linux/pagevec.h>
#include <linux/task_io_accounting_ops.h>
#include <linux/buffer_head.h> /* grr. try_to_release_page,
do_invalidatepage */

Expand Down Expand Up @@ -69,7 +70,8 @@ truncate_complete_page(struct address_space *mapping, struct page *page)
if (PagePrivate(page))
do_invalidatepage(page, 0);

clear_page_dirty(page);
if (test_clear_page_dirty(page))
task_io_account_cancelled_write(PAGE_CACHE_SIZE);
ClearPageUptodate(page);
ClearPageMappedToDisk(page);
remove_from_page_cache(page);
Expand Down

0 comments on commit 8535302

Please sign in to comment.