mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-11-21 00:58:28 +08:00
[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" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
bb4067e341
commit
5f2a105d5e
@ -60,7 +60,8 @@ void cancel_dirty_page(struct page *page, unsigned int account_size)
|
|||||||
WARN_ON(++warncount < 5);
|
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);
|
dec_zone_page_state(page, NR_FILE_DIRTY);
|
||||||
task_io_account_cancelled_write(account_size);
|
task_io_account_cancelled_write(account_size);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user