Skip to contentSkip to conversation

io accounting minor fix

PATCH New Fengguang Wu 1 participant 1 message Dec 4, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 io accounting minor fix

Account only successful nfs/fuse reads.

---

mm/readahead.c +1 -1
@@ -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;