From: Christoph Hellwig <hch@lst.de>
To: marcelo@conectiva.com.br
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] inline grab_cache_page
Date: Thu, 29 Aug 2002 02:18:41 +0200 [thread overview]
Message-ID: <20020829021841.A9792@lst.de> (raw)
It's nothing but a wrapper for slightly different parameters around
find_or_create pages. Also some external code (e.g. XFS) want the
latter exported to control the gfp_mask.
--- linux-2.4.20-pre4/include/linux/pagemap.h Tue Aug 6 11:27:18 2002
+++ linux/include/linux/pagemap.h Sun Aug 25 19:32:11 2002
@@ -97,7 +97,15 @@ static inline void wait_on_page(struct p
___wait_on_page(page);
}
-extern struct page * grab_cache_page (struct address_space *, unsigned long);
+/*
+ * Returns locked page at given index in given cache, creating it if needed.
+ */
+static inline struct page *grab_cache_page(struct address_space *mapping, unsigned long index)
+{
+ return find_or_create_page(mapping, index, mapping->gfp_mask);
+}
+
+
extern struct page * grab_cache_page_nowait (struct address_space *, unsigned long);
typedef int filler_t(void *, struct page*);
--- linux-2.4.20-pre4/kernel/ksyms.c Tue Aug 13 15:56:05 2002
+++ linux/kernel/ksyms.c Sun Aug 25 19:32:04 2002
@@ -261,7 +262,7 @@ EXPORT_SYMBOL(poll_freewait);
EXPORT_SYMBOL(ROOT_DEV);
EXPORT_SYMBOL(__find_get_page);
EXPORT_SYMBOL(__find_lock_page);
-EXPORT_SYMBOL(grab_cache_page);
+EXPORT_SYMBOL(find_or_create_page);
EXPORT_SYMBOL(grab_cache_page_nowait);
EXPORT_SYMBOL(read_cache_page);
EXPORT_SYMBOL(set_page_dirty);
--- linux-2.4.20-pre4/mm/filemap.c Tue Aug 20 11:37:00 2002
+++ linux/mm/filemap.c Tue Aug 20 11:39:48 2002
@@ -1029,15 +1029,6 @@ struct page * find_or_create_page(struct
}
/*
- * Returns locked page at given index in given cache, creating it if needed.
- */
-struct page *grab_cache_page(struct address_space *mapping, unsigned long index)
-{
- return find_or_create_page(mapping, index, mapping->gfp_mask);
-}
-
-
-/*
* Same as grab_cache_page, but do not wait if the page is unavailable.
* This is intended for speculative data generators, where the data can
* be regenerated if the page couldn't be grabbed. This routine should
reply other threads:[~2002-08-29 0:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20020829021841.A9792@lst.de \
--to=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
/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