[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070412024938.27380.22802.patchbomb.py@localhost>
Date: Wed, 11 Apr 2007 19:49:38 -0700
From: Nate Diller <nate.diller@...il.com>
To: Andrew Morton <akpm@...l.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
Christoph Hellwig <hch@...radead.org>,
Roman Zippel <zippel@...ux-m68k.org>,
Mikulas Patocka <mikulas@...ax.karlin.mff.cuni.cz>,
David Woodhouse <dwmw2@...radead.org>,
Dave Kleikamp <shaggy@...tin.ibm.com>,
Anton Altaparmakov <aia21@...tab.net>,
Evgeniy Dushistov <dushistov@...l.ru>
Cc: linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
reiserfs-dev@...esys.com
Subject: [PATCH 15/17] sysv: convert dir_get_page to read_kmap_page
Replace sysv dir_get_page() with the new read_kmap_page().
Signed-off-by: Nate Diller <nate.diller@...il.com>
---
diff -urpN -X dontdiff linux-2.6.21-rc5-mm4/fs/sysv/dir.c linux-2.6.21-rc5-mm4-test/fs/sysv/dir.c
--- linux-2.6.21-rc5-mm4/fs/sysv/dir.c 2007-04-05 17:14:25.000000000 -0700
+++ linux-2.6.21-rc5-mm4-test/fs/sysv/dir.c 2007-04-06 01:59:19.000000000 -0700
@@ -50,15 +50,6 @@ static int dir_commit_chunk(struct page
return err;
}
-static struct page * dir_get_page(struct inode *dir, unsigned long n)
-{
- struct address_space *mapping = dir->i_mapping;
- struct page *page = read_mapping_page(mapping, n, NULL);
- if (!IS_ERR(page))
- kmap(page);
- return page;
-}
-
static int sysv_readdir(struct file * filp, void * dirent, filldir_t filldir)
{
unsigned long pos = filp->f_pos;
@@ -77,7 +68,7 @@ static int sysv_readdir(struct file * fi
for ( ; n < npages; n++, offset = 0) {
char *kaddr, *limit;
struct sysv_dir_entry *de;
- struct page *page = dir_get_page(inode, n);
+ struct page *page = read_kmap_page(inode->i_mapping, n);
if (IS_ERR(page))
continue;
@@ -149,7 +140,7 @@ struct sysv_dir_entry *sysv_find_entry(s
do {
char *kaddr;
- page = dir_get_page(dir, n);
+ page = read_kmap_page(dir->i_mapping, n);
if (!IS_ERR(page)) {
kaddr = (char*)page_address(page);
de = (struct sysv_dir_entry *) kaddr;
@@ -191,7 +182,7 @@ int sysv_add_link(struct dentry *dentry,
/* We take care of directory expansion in the same loop */
for (n = 0; n <= npages; n++) {
- page = dir_get_page(dir, n);
+ page = read_kmap_page(dir->i_mapping, n);
err = PTR_ERR(page);
if (IS_ERR(page))
goto out;
@@ -299,7 +290,7 @@ int sysv_empty_dir(struct inode * inode)
for (i = 0; i < npages; i++) {
char *kaddr;
struct sysv_dir_entry * de;
- page = dir_get_page(inode, i);
+ page = read_kmap_page(inode->i_mapping, i);
if (IS_ERR(page))
continue;
@@ -353,7 +344,7 @@ void sysv_set_link(struct sysv_dir_entry
struct sysv_dir_entry * sysv_dotdot (struct inode *dir, struct page **p)
{
- struct page *page = dir_get_page(dir, 0);
+ struct page *page = read_kmap_page(dir->i_mapping, 0);
struct sysv_dir_entry *de = NULL;
if (!IS_ERR(page)) {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists