page_writeback: put account_page_redirty() after set_page_dirty()
authorKonstantin Khebnikov <khlebnikov@yandex-team.ru>
Wed, 11 Feb 2015 23:26:55 +0000 (15:26 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 12 Feb 2015 01:06:04 +0000 (17:06 -0800)
commit8d38633c3b4093aca7524945f1e9249d7d3a44da
treec2220d43cd690f94dccb8d0f4917199ed5689a9c
parentb30fe6c7ced70f62862c3d09357e7e8084e98d9f
page_writeback: put account_page_redirty() after set_page_dirty()

Helper account_page_redirty() fixes dirty pages counter for redirtied
pages.  This patch puts it after dirtying and prevents temporary
underflows of dirtied pages counters on zone/bdi and current->nr_dirtied.

Signed-off-by: Konstantin Khebnikov <khlebnikov@yandex-team.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/btrfs/extent_io.c
mm/page-writeback.c