linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Lameter <clameter@sgi.com>
To: akpm@linux-foundation.org
Cc: linux-mm@kvack.org
Subject: [patch 02/14] Reiser4 portion of zero_user cleanup patch
Date: Tue, 25 Sep 2007 16:25:45 -0700	[thread overview]
Message-ID: <20070925233005.845179930@sgi.com> (raw)
In-Reply-To: 20070925232543.036615409@sgi.com

[-- Attachment #1: zero_user_reiserfs --]
[-- Type: text/plain, Size: 6009 bytes --]

Reiser4 only exists in mm. So split this off.

Signed-off-by: Christoph Lameter <clameter@sgi.com>

---
 fs/buffer.c                              |    2 +-
 fs/reiser4/plugin/file/cryptcompress.c   |    8 +++-----
 fs/reiser4/plugin/file/file.c            |    4 ++--
 fs/reiser4/plugin/item/ctail.c           |    8 ++++----
 fs/reiser4/plugin/item/extent_file_ops.c |    4 ++--
 fs/reiser4/plugin/item/tail.c            |    3 +--
 6 files changed, 13 insertions(+), 16 deletions(-)

Index: linux-2.6.23-rc8-mm1/fs/reiser4/plugin/file/cryptcompress.c
===================================================================
--- linux-2.6.23-rc8-mm1.orig/fs/reiser4/plugin/file/cryptcompress.c	2007-09-25 15:12:22.000000000 -0700
+++ linux-2.6.23-rc8-mm1/fs/reiser4/plugin/file/cryptcompress.c	2007-09-25 15:12:51.000000000 -0700
@@ -2056,7 +2056,7 @@ static int write_hole(struct inode *inod
 
 		to_pg = min((typeof(pg_off))PAGE_CACHE_SIZE - pg_off, cl_count);
 		lock_page(page);
-		zero_user_page(page, pg_off, to_pg, KM_USER0);
+		zero_user(page, pg_off, to_pg);
 		SetPageUptodate(page);
 		reiser4_set_page_dirty_internal(page);
 		mark_page_accessed(page);
@@ -2294,8 +2294,7 @@ static int read_some_cluster_pages(struc
 			off = off_to_pgoff(win->off+win->count+win->delta);
 			if (off) {
 				lock_page(pg);
-				zero_user_page(pg, off, PAGE_CACHE_SIZE - off,
-						KM_USER0);
+				zero_user_segment(pg, off, PAGE_CACHE_SIZE);
 				unlock_page(pg);
 			}
 		}
@@ -2342,8 +2341,7 @@ static int read_some_cluster_pages(struc
 
 			offset =
 			    off_to_pgoff(win->off + win->count + win->delta);
-			zero_user_page(pg, offset, PAGE_CACHE_SIZE - offset,
-					KM_USER0);
+			zero_user_segment(pg, offset, PAGE_CACHE_SIZE);
 			unlock_page(pg);
 			/* still not uptodate */
 			break;
Index: linux-2.6.23-rc8-mm1/fs/reiser4/plugin/file/file.c
===================================================================
--- linux-2.6.23-rc8-mm1.orig/fs/reiser4/plugin/file/file.c	2007-09-25 15:12:22.000000000 -0700
+++ linux-2.6.23-rc8-mm1/fs/reiser4/plugin/file/file.c	2007-09-25 15:12:51.000000000 -0700
@@ -532,7 +532,7 @@ static int shorten_file(struct inode *in
 
 	lock_page(page);
 	assert("vs-1066", PageLocked(page));
-	zero_user_page(page, padd_from, PAGE_CACHE_SIZE - padd_from, KM_USER0);
+	zero_user_segment(page, padd_from, PAGE_CACHE_SIZE);
 	unlock_page(page);
 	page_cache_release(page);
 	/* the below does up(sbinfo->delete_mutex). Do not get confused */
@@ -1437,7 +1437,7 @@ int readpage_unix_file(struct file *file
 
 	if (page->mapping->host->i_size <= page_offset(page)) {
 		/* page is out of file */
-		zero_user_page(page, 0, PAGE_CACHE_SIZE, KM_USER0);
+		zero_user(page, 0, PAGE_CACHE_SIZE);
 		SetPageUptodate(page);
 		unlock_page(page);
 		return 0;
Index: linux-2.6.23-rc8-mm1/fs/reiser4/plugin/item/ctail.c
===================================================================
--- linux-2.6.23-rc8-mm1.orig/fs/reiser4/plugin/item/ctail.c	2007-09-25 15:12:22.000000000 -0700
+++ linux-2.6.23-rc8-mm1/fs/reiser4/plugin/item/ctail.c	2007-09-25 15:12:51.000000000 -0700
@@ -638,7 +638,7 @@ int do_readpage_ctail(struct inode * ino
 		goto exit;
 	to_page = pbytes(page_index(page), inode);
 	if (to_page == 0) {
-		zero_user_page(page, 0, PAGE_CACHE_SIZE, KM_USER0);
+		zero_user(page, 0, PAGE_CACHE_SIZE);
 		SetPageUptodate(page);
 		goto exit;
 	}
@@ -655,7 +655,7 @@ int do_readpage_ctail(struct inode * ino
 		/* refresh bytes */
 		to_page = pbytes(page_index(page), inode);
 		if (to_page == 0) {
-			zero_user_page(page, 0, PAGE_CACHE_SIZE, KM_USER0);
+			zero_user(page, 0, PAGE_CACHE_SIZE);
 			SetPageUptodate(page);
 			goto exit;
 		}
@@ -678,7 +678,7 @@ int do_readpage_ctail(struct inode * ino
 		 */
 	case FAKE_DISK_CLUSTER:
 		/* fill the page by zeroes */
-		zero_user_page(page, 0, PAGE_CACHE_SIZE, KM_USER0);
+		zero_user(page, 0, PAGE_CACHE_SIZE);
 		SetPageUptodate(page);
 		break;
 	case PREP_DISK_CLUSTER:
@@ -788,7 +788,7 @@ static int ctail_readpages_filler(void *
 		return 0;
 	}
 	if (pbytes(page_index(page), inode) == 0) {
-		zero_user_page(page, 0, PAGE_CACHE_SIZE, KM_USER0);
+		zero_user(page, 0, PAGE_CACHE_SIZE);
 		SetPageUptodate(page);
 		unlock_page(page);
 		return 0;
Index: linux-2.6.23-rc8-mm1/fs/reiser4/plugin/item/extent_file_ops.c
===================================================================
--- linux-2.6.23-rc8-mm1.orig/fs/reiser4/plugin/item/extent_file_ops.c	2007-09-25 15:12:22.000000000 -0700
+++ linux-2.6.23-rc8-mm1/fs/reiser4/plugin/item/extent_file_ops.c	2007-09-25 15:12:51.000000000 -0700
@@ -1136,7 +1136,7 @@ int reiser4_do_readpage_extent(reiser4_e
 		 */
 		j = jfind(mapping, index);
 		if (j == NULL) {
-			zero_user_page(page, 0, PAGE_CACHE_SIZE, KM_USER0);
+			zero_user(page, 0, PAGE_CACHE_SIZE);
 			SetPageUptodate(page);
 			unlock_page(page);
 			return 0;
@@ -1151,7 +1151,7 @@ int reiser4_do_readpage_extent(reiser4_e
 		block = *jnode_get_io_block(j);
 		spin_unlock_jnode(j);
 		if (block == 0) {
-			zero_user_page(page, 0, PAGE_CACHE_SIZE, KM_USER0);
+			zero_user(page, 0, PAGE_CACHE_SIZE);
 			SetPageUptodate(page);
 			unlock_page(page);
 			jput(j);
Index: linux-2.6.23-rc8-mm1/fs/reiser4/plugin/item/tail.c
===================================================================
--- linux-2.6.23-rc8-mm1.orig/fs/reiser4/plugin/item/tail.c	2007-09-25 15:12:22.000000000 -0700
+++ linux-2.6.23-rc8-mm1/fs/reiser4/plugin/item/tail.c	2007-09-25 15:12:51.000000000 -0700
@@ -392,8 +392,7 @@ static int do_readpage_tail(uf_coord_t *
 
  done:
 	if (mapped != PAGE_CACHE_SIZE)
-		zero_user_page(page, mapped, PAGE_CACHE_SIZE - mapped,
-				KM_USER0);
+		zero_user_segment(page, mapped, PAGE_CACHE_SIZE);
 	SetPageUptodate(page);
  out_unlock_page:
 	unlock_page(page);

-- 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2007-09-25 23:25 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-25 23:25 [patch 00/14] Misc cleanups / fixes Christoph Lameter
2007-09-25 23:25 ` [patch 01/14] Pagecache zeroing: zero_user_segment, zero_user_segments and zero_user Christoph Lameter
2007-09-25 23:25 ` Christoph Lameter [this message]
2007-09-25 23:25 ` [patch 03/14] Move vmalloc_to_page() to mm/vmalloc Christoph Lameter
2007-09-25 23:25 ` [patch 04/14] vmalloc: add const to void ..tmp_kallsyms1.o.cmd ..tmp_kallsyms2.o.cmd ..tmp_vmlinux1.cmd ..tmp_vmlinux2.cmd .cf .cf1 .cf2 .cf3 .cfnet .config .config.old .gitignore .mailmap .missing-syscalls.d .pc .tmp_System.map .tmp_kallsyms1.S .tmp_kallsyms1.o .tmp_kallsyms2.S .tmp_kallsyms2.o .tmp_versions .tmp_vmlinux1 .tmp_vmlinux2 .version .vmlinux.cmd .vmlinux.o.cmd COPYING CREDITS Documentation Kbuild MAINTAINERS Makefile Module.symvers README REPORTING-BUGS System.map arch b block crypto drivers fs include init ipc kernel lib linux-2.6.23-rc8-mm1.tar.gz mips mm net patches scripts security sound tar-install test test_out usr vmlinux vmlinux.gz vmlinux.o vmlinux.sym xx parameters Christoph Lameter
2007-09-25 23:25 ` [patch 05/14] i386: Resolve dependency of asm-i386/pgtable.h on highmem.h Christoph Lameter
2007-09-25 23:25 ` [patch 06/14] is_vmalloc_addr(): Check if an address is within the vmalloc boundaries Christoph Lameter
2007-09-25 23:25 ` [patch 07/14] vmalloc: Clean up page array indexing Christoph Lameter
2007-09-25 23:25 ` [patch 08/14] vunmap: return page array passed on vmap() Christoph Lameter
2007-09-25 23:25 ` [patch 09/14] SLUB: Move count_partial() Christoph Lameter
2007-09-25 23:25 ` [patch 10/14] SLUB: Rename NUMA defrag_ratio to remote_node_defrag_ratio Christoph Lameter
2007-09-25 23:25 ` [patch 11/14] SLUB: Consolidate add_partial() and add_partial_tail() to one function Christoph Lameter
2007-09-25 23:25 ` [patch 12/14] VM: Allow get_page_unless_zero on compound pages Christoph Lameter
2007-09-25 23:25 ` [patch 13/14] dentries: Extract common code to remove dentry from lru Christoph Lameter
2007-10-22 21:29   ` Andrew Morton
2007-10-25  2:23     ` Christoph Lameter
2007-10-25  2:34       ` Andrew Morton
2007-10-25  2:50         ` Christoph Lameter
2007-10-25  3:03           ` Andrew Morton
2007-09-25 23:25 ` [patch 14/14] bufferhead: Revert constructor removal Christoph Lameter
2007-10-22 21:31   ` Andrew Morton
2007-10-25  2:25     ` Christoph Lameter
2007-09-27 20:25 ` [patch 00/14] Misc cleanups / fixes Andrew Morton

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=20070925233005.845179930@sgi.com \
    --to=clameter@sgi.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.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;
as well as URLs for NNTP newsgroup(s).