aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-08-23 21:44:06 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-08-23 21:44:06 -0700
commit467474d051718d839e345fee6867de5d14051f00 (patch)
treef74efca6aaf74a99d37e4f5ce290441733e1a3cb /mm
parent484107a59940c58f44c18f82a8c0070226c6cd4d (diff)
downloadhistory-467474d051718d839e345fee6867de5d14051f00.tar.gz
[PATCH] file_ra_state_init speedup
Marcelo points out that this function's main caller already memsets the structure, so avoid doing it again. Also, an earlier knfsd patch withdrew file_ra_state_init()'s other caller, so unexport this function. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/readahead.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/mm/readahead.c b/mm/readahead.c
index 3780d40b39ad93..c58ae5694421f3 100644
--- a/mm/readahead.c
+++ b/mm/readahead.c
@@ -28,16 +28,15 @@ struct backing_dev_info default_backing_dev_info = {
EXPORT_SYMBOL_GPL(default_backing_dev_info);
/*
- * Initialise a struct file's readahead state
+ * Initialise a struct file's readahead state. Assumes that the caller has
+ * memset *ra to zero.
*/
void
file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping)
{
- memset(ra, 0, sizeof(*ra));
ra->ra_pages = mapping->backing_dev_info->ra_pages;
ra->average = ra->ra_pages / 2;
}
-EXPORT_SYMBOL(file_ra_state_init);
/*
* Return max readahead size for this inode in number-of-pages.