public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Arjan van de Ven <arjan@infradead.org>
Cc: Anton Altaparmakov <aia21@cam.ac.uk>,
	Linus Torvalds <torvalds@osdl.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [2.6 PATCH] Export invalidate_mapping_pages() to modules.
Date: Wed, 3 Jan 2007 11:03:32 -0800	[thread overview]
Message-ID: <20070103110332.ba3d39a2.akpm@osdl.org> (raw)
In-Reply-To: <1167830972.3095.3.camel@laptopd505.fenrus.org>

On Wed, 03 Jan 2007 05:29:31 -0800
Arjan van de Ven <arjan@infradead.org> wrote:

> On Mon, 2007-01-01 at 23:28 +0000, Anton Altaparmakov wrote:
> > Hi Linus and Andrew,
> > 
> > Please apply below patch which exports invalidate_mapping_pages() to 
> > modules.  It makes no sense to me to export invalidate_inode_pages() and 
> > not invalidate_mapping_pages() and I actually need 
> > invalidate_mapping_pages() because of its range specification ability...
> > 
> > It would be great if this could make it into 2.6.20!
> 
> 
> yet.. if there's not a single user it makes the kernel binary 100 to 150
> bytes bigger in memory......  

I fixed that.


From: Anton Altaparmakov <aia21@cam.ac.uk>

It makes no sense to me to export invalidate_inode_pages() and not
invalidate_mapping_pages() and I actually need invalidate_mapping_pages()
because of its range specification ability...

akpm: also remove the export of invalidate_inode_pages() by making it an
inlined wrapper.

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 include/linux/fs.h |    8 +++++++-
 mm/truncate.c      |    7 +------
 2 files changed, 8 insertions(+), 7 deletions(-)

diff -puN mm/truncate.c~export-invalidate_mapping_pages-to-modules mm/truncate.c
--- a/mm/truncate.c~export-invalidate_mapping_pages-to-modules
+++ a/mm/truncate.c
@@ -303,12 +303,7 @@ unlock:
 	}
 	return ret;
 }
-
-unsigned long invalidate_inode_pages(struct address_space *mapping)
-{
-	return invalidate_mapping_pages(mapping, 0, ~0UL);
-}
-EXPORT_SYMBOL(invalidate_inode_pages);
+EXPORT_SYMBOL(invalidate_mapping_pages);
 
 /*
  * This is like invalidate_complete_page(), except it ignores the page's
diff -puN include/linux/fs.h~export-invalidate_mapping_pages-to-modules include/linux/fs.h
--- a/include/linux/fs.h~export-invalidate_mapping_pages-to-modules
+++ a/include/linux/fs.h
@@ -1571,7 +1571,13 @@ extern int invalidate_partition(struct g
 extern int invalidate_inodes(struct super_block *);
 unsigned long invalidate_mapping_pages(struct address_space *mapping,
 					pgoff_t start, pgoff_t end);
-unsigned long invalidate_inode_pages(struct address_space *mapping);
+
+static inline unsigned long
+invalidate_inode_pages(struct address_space *mapping)
+{
+	return invalidate_mapping_pages(mapping, 0, ~0UL);
+}
+
 static inline void invalidate_remote_inode(struct inode *inode)
 {
 	if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) ||
_


  parent reply	other threads:[~2007-01-03 19:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-01 23:28 [2.6 PATCH] Export invalidate_mapping_pages() to modules Anton Altaparmakov
2007-01-03 13:29 ` Arjan van de Ven
2007-01-03 18:58   ` Anton Altaparmakov
2007-01-03 19:03   ` Andrew Morton [this message]
2007-01-03 20:11     ` Christoph Hellwig
2007-01-03 20:44       ` 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=20070103110332.ba3d39a2.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=aia21@cam.ac.uk \
    --cc=arjan@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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