From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wu Fengguang Subject: [PATCH 18/47] writeback: move BDI_WRITTEN accounting into __bdi_writeout_inc() Date: Mon, 13 Dec 2010 14:43:07 +0800 Message-ID: <20101213064839.157986401@intel.com> References: <20101213064249.648862451@intel.com> Return-path: Received: from kanga.kvack.org ([205.233.56.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PS2G9-00065G-PL for glkm-linux-mm-2@m.gmane.org; Mon, 13 Dec 2010 07:51:46 +0100 Received: from mail143.messagelabs.com (mail143.messagelabs.com [216.82.254.35]) by kanga.kvack.org (Postfix) with SMTP id 810246B00B7 for ; Mon, 13 Dec 2010 01:49:49 -0500 (EST) Content-Disposition: inline; filename=writeback-bdi-written-fix.patch Sender: owner-linux-mm@kvack.org To: Andrew Morton Cc: Jan Kara , Peter Zijlstra , Wu Fengguang , Christoph Hellwig , Trond Myklebust , Dave Chinner , Theodore Ts'o , Chris Mason , Mel Gorman , Rik van Riel , KOSAKI Motohiro , Greg Thelen , Minchan Kim , linux-mm , linux-fsdevel@vger.kernel.org, LKML List-Id: linux-mm.kvack.org This will cover and fix fuse, which only calls bdi_writeout_inc(). -Peter CC: Peter Zijlstra Signed-off-by: Wu Fengguang --- mm/page-writeback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- linux-next.orig/mm/page-writeback.c 2010-12-08 22:44:27.000000000 +0800 +++ linux-next/mm/page-writeback.c 2010-12-08 22:44:27.000000000 +0800 @@ -199,6 +199,7 @@ int dirty_bytes_handler(struct ctl_table */ static inline void __bdi_writeout_inc(struct backing_dev_info *bdi) { + __inc_bdi_stat(bdi, BDI_WRITTEN); __prop_inc_percpu_max(&vm_completions, &bdi->completions, bdi->max_prop_frac); } @@ -1411,7 +1412,6 @@ int test_clear_page_writeback(struct pag PAGECACHE_TAG_WRITEBACK); if (bdi_cap_account_writeback(bdi)) { __dec_bdi_stat(bdi, BDI_WRITEBACK); - __inc_bdi_stat(bdi, BDI_WRITTEN); __bdi_writeout_inc(bdi); } } -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/ Don't email: email@kvack.org