* [2.6 patch] the scheduled find_trylock_page() removal
@ 2007-01-02 21:57 Adrian Bunk
2007-01-04 4:53 ` Nick Piggin
0 siblings, 1 reply; 3+ messages in thread
From: Adrian Bunk @ 2007-01-02 21:57 UTC (permalink / raw)
To: Nick Piggin; +Cc: linux-kernel
This patch contains the scheduled find_trylock_page() removal.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
Documentation/feature-removal-schedule.txt | 12 ------------
include/linux/pagemap.h | 2 --
mm/filemap.c | 20 --------------------
3 files changed, 34 deletions(-)
--- linux-2.6.20-rc2-mm1/Documentation/feature-removal-schedule.txt.old 2007-01-02 21:34:57.000000000 +0100
+++ linux-2.6.20-rc2-mm1/Documentation/feature-removal-schedule.txt 2007-01-02 21:35:12.000000000 +0100
@@ -163,18 +163,6 @@
---------------------------
-What: find_trylock_page
-When: January 2007
-Why: The interface no longer has any callers left in the kernel. It
- is an odd interface (compared with other find_*_page functions), in
- that it does not take a refcount to the page, only the page lock.
- It should be replaced with find_get_page or find_lock_page if possible.
- This feature removal can be reevaluated if users of the interface
- cannot cleanly use something else.
-Who: Nick Piggin <npiggin@suse.de>
-
----------------------------
-
What: Interrupt only SA_* flags
When: Januar 2007
Why: The interrupt related SA_* flags are replaced by IRQF_* to move them
--- linux-2.6.20-rc2-mm1/include/linux/pagemap.h.old 2007-01-02 21:35:20.000000000 +0100
+++ linux-2.6.20-rc2-mm1/include/linux/pagemap.h 2007-01-02 21:35:26.000000000 +0100
@@ -78,8 +78,6 @@
unsigned long index);
extern struct page * find_lock_page(struct address_space *mapping,
unsigned long index);
-extern __deprecated_for_modules struct page * find_trylock_page(
- struct address_space *mapping, unsigned long index);
extern struct page * find_or_create_page(struct address_space *mapping,
unsigned long index, gfp_t gfp_mask);
unsigned find_get_pages(struct address_space *mapping, pgoff_t start,
--- linux-2.6.20-rc2-mm1/mm/filemap.c.old 2007-01-02 21:35:32.000000000 +0100
+++ linux-2.6.20-rc2-mm1/mm/filemap.c 2007-01-02 21:36:36.000000000 +0100
@@ -630,26 +630,6 @@
EXPORT_SYMBOL(find_get_page);
/**
- * find_trylock_page - find and lock a page
- * @mapping: the address_space to search
- * @offset: the page index
- *
- * Same as find_get_page(), but trylock it instead of incrementing the count.
- */
-struct page *find_trylock_page(struct address_space *mapping, unsigned long offset)
-{
- struct page *page;
-
- read_lock_irq(&mapping->tree_lock);
- page = radix_tree_lookup(&mapping->page_tree, offset);
- if (page && TestSetPageLocked(page))
- page = NULL;
- read_unlock_irq(&mapping->tree_lock);
- return page;
-}
-EXPORT_SYMBOL(find_trylock_page);
-
-/**
* find_lock_page - locate, pin and lock a pagecache page
* @mapping: the address_space to search
* @offset: the page index
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [2.6 patch] the scheduled find_trylock_page() removal
2007-01-02 21:57 [2.6 patch] the scheduled find_trylock_page() removal Adrian Bunk
@ 2007-01-04 4:53 ` Nick Piggin
2007-01-04 15:52 ` Christoph Hellwig
0 siblings, 1 reply; 3+ messages in thread
From: Nick Piggin @ 2007-01-04 4:53 UTC (permalink / raw)
To: Adrian Bunk; +Cc: Nick Piggin, linux-kernel, Linux Memory Management
Adrian Bunk wrote:
> This patch contains the scheduled find_trylock_page() removal.
>
> Signed-off-by: Adrian Bunk <bunk@stusta.de>
I guess I don't have a problem with this going into -mm and making its way
upstream sometime after the next release.
I would normally say it is OK to stay for another year because it is so
unintrusive, but I don't like the fact it doesn't give one an explicit ref
on the page -- it could be misused slightly more easily than find_lock_page
or find_get_page.
Anyone object? Otherwise:
Acked-by: Nick Piggin <npiggin@suse.de>
--
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [2.6 patch] the scheduled find_trylock_page() removal
2007-01-04 4:53 ` Nick Piggin
@ 2007-01-04 15:52 ` Christoph Hellwig
0 siblings, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2007-01-04 15:52 UTC (permalink / raw)
To: Nick Piggin
Cc: Adrian Bunk, Nick Piggin, linux-kernel, Linux Memory Management
On Thu, Jan 04, 2007 at 03:53:07PM +1100, Nick Piggin wrote:
> Adrian Bunk wrote:
> >This patch contains the scheduled find_trylock_page() removal.
> >
> >Signed-off-by: Adrian Bunk <bunk@stusta.de>
>
> I guess I don't have a problem with this going into -mm and making its way
> upstream sometime after the next release.
>
> I would normally say it is OK to stay for another year because it is so
> unintrusive, but I don't like the fact it doesn't give one an explicit ref
> on the page -- it could be misused slightly more easily than find_lock_page
> or find_get_page.
>
> Anyone object? Otherwise:
Just kill it. There's absolutely no point in keeping dead code around.
It's bad enough we keep such things around for half a year.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-01-04 15:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-02 21:57 [2.6 patch] the scheduled find_trylock_page() removal Adrian Bunk
2007-01-04 4:53 ` Nick Piggin
2007-01-04 15:52 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox