public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Fengguang Wu <fengguang.wu@gmail.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] io accounting minor fix
Date: Mon, 4 Dec 2006 16:54:36 +0800	[thread overview]
Message-ID: <365222471.26712@ustc.edu.cn> (raw)
Message-ID: <20061204085436.GA6602@mail.ustc.edu.cn> (raw)

Account only successful nfs/fuse reads.

Signed-off-by: Fengguang Wu <wfg@mail.ustc.edu.cn>
---

--- linux-2.6.19-rc6-mm2.orig/mm/readahead.c
+++ linux-2.6.19-rc6-mm2/mm/readahead.c
@@ -242,7 +242,6 @@ int read_cache_pages(struct address_spac
 			page_cache_release(page);
 			continue;
 		}
-		task_io_account_read(PAGE_CACHE_SIZE);
 		ret = filler(data, page);
 		if (!pagevec_add(&lru_pvec, page)) {
 			cond_resched();
@@ -252,6 +251,7 @@ int read_cache_pages(struct address_spac
 			put_pages_list(pages);
 			break;
 		}
+		task_io_account_read(PAGE_CACHE_SIZE);
 	}
 	pagevec_lru_add(&lru_pvec);
 	return ret;

                 reply	other threads:[~2006-12-04  8:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=365222471.26712@ustc.edu.cn \
    --to=fengguang.wu@gmail.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox