Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux: Kernel

[PATCH] libfs: remove page up-to-date check from simple_readpage

 

 

Linux kernel RSS feed   Index | Next | Previous | View Threaded


penberg at cs

Jul 19, 2006, 7:09 AM

Post #1 of 2 (619 views)
Permalink
[PATCH] libfs: remove page up-to-date check from simple_readpage

From: Pekka Enberg <penberg[at]cs.helsinki.fi>

This patch removes 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.

Signed-off-by: Pekka Enberg <penberg[at]cs.helsinki.fi>
---
fs/libfs.c | 5 -----
1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/fs/libfs.c b/fs/libfs.c
index ac02ea6..b8e5cec 100644
--- a/fs/libfs.c
+++ b/fs/libfs.c
@@ -319,15 +319,10 @@ int simple_readpage(struct file *file, s
{
void *kaddr;

- if (PageUptodate(page))
- goto out;
-
kaddr = kmap_atomic(page, KM_USER0);
memset(kaddr, 0, PAGE_CACHE_SIZE);
kunmap_atomic(kaddr, KM_USER0);
flush_dcache_page(page);
- SetPageUptodate(page);
-out:
unlock_page(page);
return 0;
}
--
1.4.1

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo[at]vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


penberg at cs

Jul 19, 2006, 7:16 AM

Post #2 of 2 (555 views)
Permalink
Re: [PATCH] libfs: remove page up-to-date check from simple_readpage [In reply to]

Uh, oh, removed too much. We obviously need to set the PG_uptodate flag
in simple_readpage(). Sorry about that. Updated patch follows.

From: Pekka Enberg <penberg[at]cs.helsinki.fi>

This patch removes 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.

Signed-off-by: Pekka Enberg <penberg[at]cs.helsinki.fi>
---
fs/libfs.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/fs/libfs.c b/fs/libfs.c
index ac02ea6..0d2cc61 100644
--- a/fs/libfs.c
+++ b/fs/libfs.c
@@ -319,15 +319,11 @@ int simple_readpage(struct file *file, s
{
void *kaddr;

- if (PageUptodate(page))
- goto out;
-
kaddr = kmap_atomic(page, KM_USER0);
memset(kaddr, 0, PAGE_CACHE_SIZE);
kunmap_atomic(kaddr, KM_USER0);
flush_dcache_page(page);
SetPageUptodate(page);
-out:
unlock_page(page);
return 0;
}
--
1.4.1

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo[at]vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Linux kernel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.