diff options
author | Pekka J Enberg <penberg@cs.Helsinki.FI> | 2006-09-29 12:59:09 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-29 20:18:06 +0400 |
commit | c0d92cbc5849f26451f478d538b8d885ae547221 (patch) | |
tree | bf5ef7e15c6f35443a8e156f3bcd9c6642004cdd /fs/libfs.c | |
parent | cfedc920a7bca828fd4af8e203f7d8514990f999 (diff) | |
download | linux-c0d92cbc5849f26451f478d538b8d885ae547221.tar.xz |
[PATCH] libfs: remove page up-to-date check from simple_readpage
Remove the unnecessary PageUptodate check from simple_readpage. The only
two callers for ->readpage that don't have explicit PageUptodate check are
read_cache_pages and page_cache_read which operate on newly allocated pages
which don't have the flag set.
[akpm: use the allegedly-faster clear_page(), too]
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/libfs.c')
-rw-r--r-- | fs/libfs.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/fs/libfs.c b/fs/libfs.c index 8db5afb7b0a7..3793aaa14577 100644 --- a/fs/libfs.c +++ b/fs/libfs.c @@ -317,17 +317,9 @@ int simple_rename(struct inode *old_dir, struct dentry *old_dentry, int simple_readpage(struct file *file, struct page *page) { - void *kaddr; - - if (PageUptodate(page)) - goto out; - - kaddr = kmap_atomic(page, KM_USER0); - memset(kaddr, 0, PAGE_CACHE_SIZE); - kunmap_atomic(kaddr, KM_USER0); + clear_highpage(page); flush_dcache_page(page); SetPageUptodate(page); -out: unlock_page(page); return 0; } |