LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [2.6 patch] make mm/rmap.c:anon_vma_cachep static
@ 2008-02-25  0:07 Adrian Bunk
  0 siblings, 0 replies; 9+ messages in thread
From: Adrian Bunk @ 2008-02-25  0:07 UTC (permalink / raw)
  To: Rik van Riel; +Cc: linux-kernel

This patch makes the needlessly global anon_vma_cachep static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>

---

 include/linux/rmap.h |   12 ------------
 mm/rmap.c            |   12 +++++++++++-
 2 files changed, 11 insertions(+), 13 deletions(-)

8d2d63d71ecbf2db78f31025acb136c9dd4db6a2 diff --git a/include/linux/rmap.h b/include/linux/rmap.h
index 1383692..8a8dbb9 100644
--- a/include/linux/rmap.h
+++ b/include/linux/rmap.h
@@ -31,18 +31,6 @@ struct anon_vma {
 
 #ifdef CONFIG_MMU
 
-extern struct kmem_cache *anon_vma_cachep;
-
-static inline struct anon_vma *anon_vma_alloc(void)
-{
-	return kmem_cache_alloc(anon_vma_cachep, GFP_KERNEL);
-}
-
-static inline void anon_vma_free(struct anon_vma *anon_vma)
-{
-	kmem_cache_free(anon_vma_cachep, anon_vma);
-}
-
 static inline void anon_vma_lock(struct vm_area_struct *vma)
 {
 	struct anon_vma *anon_vma = vma->anon_vma;
diff --git a/mm/rmap.c b/mm/rmap.c
index 8fd527c..ef6bb36 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -52,7 +52,17 @@
 
 #include <asm/tlbflush.h>
 
-struct kmem_cache *anon_vma_cachep;
+static struct kmem_cache *anon_vma_cachep;
+
+static inline struct anon_vma *anon_vma_alloc(void)
+{
+	return kmem_cache_alloc(anon_vma_cachep, GFP_KERNEL);
+}
+
+static inline void anon_vma_free(struct anon_vma *anon_vma)
+{
+	kmem_cache_free(anon_vma_cachep, anon_vma);
+}
 
 /* This must be called under the mmap_sem. */
 int anon_vma_prepare(struct vm_area_struct *vma)


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [2.6 patch] make mm/rmap.c:anon_vma_cachep static
  2008-08-06 21:10 Adrian Bunk
@ 2008-08-07 12:42 ` Hugh Dickins
  0 siblings, 0 replies; 9+ messages in thread
From: Hugh Dickins @ 2008-08-07 12:42 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Rik van Riel, linux-kernel, Andrew Morton

On Thu, 7 Aug 2008, Adrian Bunk wrote:
> This patch makes the needlessly global anon_vma_cachep static.
> 
> Signed-off-by: Adrian Bunk <bunk@kernel.org>
> Acked-by: Rik van Riel <riel@redhat.com>

Yes, it's much better your way, thanks Adrian: I guess there must have
been some reason during development why those went in rmap.h instead of
rmap.c, but I can't see any good reason since it hit the tree in 2.6.7.

Acked-by: Hugh Dickins <hugh@veritas.com>

> 
> ---
> 
> This patch has been sent on:
> - 5 May 2008
> - 22 Apr 2008
> - 14 Apr 2008
> - 31 Mar 2008
> - 25 Feb 2008
> 
>  include/linux/rmap.h |   12 ------------
>  mm/rmap.c            |   12 +++++++++++-
>  2 files changed, 11 insertions(+), 13 deletions(-)
> 
> 8d2d63d71ecbf2db78f31025acb136c9dd4db6a2 diff --git a/include/linux/rmap.h b/include/linux/rmap.h
> index 1383692..8a8dbb9 100644
> --- a/include/linux/rmap.h
> +++ b/include/linux/rmap.h
> @@ -31,18 +31,6 @@ struct anon_vma {
>  
>  #ifdef CONFIG_MMU
>  
> -extern struct kmem_cache *anon_vma_cachep;
> -
> -static inline struct anon_vma *anon_vma_alloc(void)
> -{
> -	return kmem_cache_alloc(anon_vma_cachep, GFP_KERNEL);
> -}
> -
> -static inline void anon_vma_free(struct anon_vma *anon_vma)
> -{
> -	kmem_cache_free(anon_vma_cachep, anon_vma);
> -}
> -
>  static inline void anon_vma_lock(struct vm_area_struct *vma)
>  {
>  	struct anon_vma *anon_vma = vma->anon_vma;
> diff --git a/mm/rmap.c b/mm/rmap.c
> index 8fd527c..ef6bb36 100644
> --- a/mm/rmap.c
> +++ b/mm/rmap.c
> @@ -52,7 +52,17 @@
>  
>  #include <asm/tlbflush.h>
>  
> -struct kmem_cache *anon_vma_cachep;
> +static struct kmem_cache *anon_vma_cachep;
> +
> +static inline struct anon_vma *anon_vma_alloc(void)
> +{
> +	return kmem_cache_alloc(anon_vma_cachep, GFP_KERNEL);
> +}
> +
> +static inline void anon_vma_free(struct anon_vma *anon_vma)
> +{
> +	kmem_cache_free(anon_vma_cachep, anon_vma);
> +}
>  
>  /* This must be called under the mmap_sem. */
>  int anon_vma_prepare(struct vm_area_struct *vma)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [2.6 patch] make mm/rmap.c:anon_vma_cachep static
@ 2008-08-06 21:10 Adrian Bunk
  2008-08-07 12:42 ` Hugh Dickins
  0 siblings, 1 reply; 9+ messages in thread
From: Adrian Bunk @ 2008-08-06 21:10 UTC (permalink / raw)
  To: Rik van Riel; +Cc: linux-kernel, Andrew Morton

This patch makes the needlessly global anon_vma_cachep static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Rik van Riel <riel@redhat.com>

---

This patch has been sent on:
- 5 May 2008
- 22 Apr 2008
- 14 Apr 2008
- 31 Mar 2008
- 25 Feb 2008

 include/linux/rmap.h |   12 ------------
 mm/rmap.c            |   12 +++++++++++-
 2 files changed, 11 insertions(+), 13 deletions(-)

8d2d63d71ecbf2db78f31025acb136c9dd4db6a2 diff --git a/include/linux/rmap.h b/include/linux/rmap.h
index 1383692..8a8dbb9 100644
--- a/include/linux/rmap.h
+++ b/include/linux/rmap.h
@@ -31,18 +31,6 @@ struct anon_vma {
 
 #ifdef CONFIG_MMU
 
-extern struct kmem_cache *anon_vma_cachep;
-
-static inline struct anon_vma *anon_vma_alloc(void)
-{
-	return kmem_cache_alloc(anon_vma_cachep, GFP_KERNEL);
-}
-
-static inline void anon_vma_free(struct anon_vma *anon_vma)
-{
-	kmem_cache_free(anon_vma_cachep, anon_vma);
-}
-
 static inline void anon_vma_lock(struct vm_area_struct *vma)
 {
 	struct anon_vma *anon_vma = vma->anon_vma;
diff --git a/mm/rmap.c b/mm/rmap.c
index 8fd527c..ef6bb36 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -52,7 +52,17 @@
 
 #include <asm/tlbflush.h>
 
-struct kmem_cache *anon_vma_cachep;
+static struct kmem_cache *anon_vma_cachep;
+
+static inline struct anon_vma *anon_vma_alloc(void)
+{
+	return kmem_cache_alloc(anon_vma_cachep, GFP_KERNEL);
+}
+
+static inline void anon_vma_free(struct anon_vma *anon_vma)
+{
+	kmem_cache_free(anon_vma_cachep, anon_vma);
+}
 
 /* This must be called under the mmap_sem. */
 int anon_vma_prepare(struct vm_area_struct *vma)


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [2.6 patch] make mm/rmap.c:anon_vma_cachep static
  2008-05-05 18:27 Adrian Bunk
  2008-05-05 20:05 ` KOSAKI Motohiro
@ 2008-05-05 20:25 ` Rik van Riel
  1 sibling, 0 replies; 9+ messages in thread
From: Rik van Riel @ 2008-05-05 20:25 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: linux-kernel, Andrew Morton

On Mon, 5 May 2008 21:27:12 +0300
Adrian Bunk <bunk@kernel.org> wrote:

> This patch makes the needlessly global anon_vma_cachep static.
> 
> Signed-off-by: Adrian Bunk <bunk@kernel.org>

Acked-by: Rik van Riel <riel@redhat.com>

-- 
All Rights Reversed

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [2.6 patch] make mm/rmap.c:anon_vma_cachep static
  2008-05-05 18:27 Adrian Bunk
@ 2008-05-05 20:05 ` KOSAKI Motohiro
  2008-05-05 20:25 ` Rik van Riel
  1 sibling, 0 replies; 9+ messages in thread
From: KOSAKI Motohiro @ 2008-05-05 20:05 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Rik van Riel, linux-kernel, Andrew Morton

> This patch makes the needlessly global anon_vma_cachep static.
>
>  Signed-off-by: Adrian Bunk <bunk@kernel.org>
>
>  ---
>
>  This patch has been sent on:
>  - 22 Apr 2008
>  - 14 Apr 2008
>  - 31 Mar 2008
>  - 25 Feb 2008

definitely right change, I think.
I wonder why this patch is needed 5 times posting.

       Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [2.6 patch] make mm/rmap.c:anon_vma_cachep static
@ 2008-05-05 18:27 Adrian Bunk
  2008-05-05 20:05 ` KOSAKI Motohiro
  2008-05-05 20:25 ` Rik van Riel
  0 siblings, 2 replies; 9+ messages in thread
From: Adrian Bunk @ 2008-05-05 18:27 UTC (permalink / raw)
  To: Rik van Riel; +Cc: linux-kernel, Andrew Morton

This patch makes the needlessly global anon_vma_cachep static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>

---

This patch has been sent on:
- 22 Apr 2008
- 14 Apr 2008
- 31 Mar 2008
- 25 Feb 2008

 include/linux/rmap.h |   12 ------------
 mm/rmap.c            |   12 +++++++++++-
 2 files changed, 11 insertions(+), 13 deletions(-)

8d2d63d71ecbf2db78f31025acb136c9dd4db6a2 diff --git a/include/linux/rmap.h b/include/linux/rmap.h
index 1383692..8a8dbb9 100644
--- a/include/linux/rmap.h
+++ b/include/linux/rmap.h
@@ -31,18 +31,6 @@ struct anon_vma {
 
 #ifdef CONFIG_MMU
 
-extern struct kmem_cache *anon_vma_cachep;
-
-static inline struct anon_vma *anon_vma_alloc(void)
-{
-	return kmem_cache_alloc(anon_vma_cachep, GFP_KERNEL);
-}
-
-static inline void anon_vma_free(struct anon_vma *anon_vma)
-{
-	kmem_cache_free(anon_vma_cachep, anon_vma);
-}
-
 static inline void anon_vma_lock(struct vm_area_struct *vma)
 {
 	struct anon_vma *anon_vma = vma->anon_vma;
diff --git a/mm/rmap.c b/mm/rmap.c
index 8fd527c..ef6bb36 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -52,7 +52,17 @@
 
 #include <asm/tlbflush.h>
 
-struct kmem_cache *anon_vma_cachep;
+static struct kmem_cache *anon_vma_cachep;
+
+static inline struct anon_vma *anon_vma_alloc(void)
+{
+	return kmem_cache_alloc(anon_vma_cachep, GFP_KERNEL);
+}
+
+static inline void anon_vma_free(struct anon_vma *anon_vma)
+{
+	kmem_cache_free(anon_vma_cachep, anon_vma);
+}
 
 /* This must be called under the mmap_sem. */
 int anon_vma_prepare(struct vm_area_struct *vma)


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [2.6 patch] make mm/rmap.c:anon_vma_cachep static
@ 2008-04-21 21:32 Adrian Bunk
  0 siblings, 0 replies; 9+ messages in thread
From: Adrian Bunk @ 2008-04-21 21:32 UTC (permalink / raw)
  To: Rik van Riel; +Cc: linux-kernel

This patch makes the needlessly global anon_vma_cachep static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>

---

This patch has been sent on:
- 14 Apr 2008
- 31 Mar 2008
- 25 Feb 2008

 include/linux/rmap.h |   12 ------------
 mm/rmap.c            |   12 +++++++++++-
 2 files changed, 11 insertions(+), 13 deletions(-)

8d2d63d71ecbf2db78f31025acb136c9dd4db6a2 diff --git a/include/linux/rmap.h b/include/linux/rmap.h
index 1383692..8a8dbb9 100644
--- a/include/linux/rmap.h
+++ b/include/linux/rmap.h
@@ -31,18 +31,6 @@ struct anon_vma {
 
 #ifdef CONFIG_MMU
 
-extern struct kmem_cache *anon_vma_cachep;
-
-static inline struct anon_vma *anon_vma_alloc(void)
-{
-	return kmem_cache_alloc(anon_vma_cachep, GFP_KERNEL);
-}
-
-static inline void anon_vma_free(struct anon_vma *anon_vma)
-{
-	kmem_cache_free(anon_vma_cachep, anon_vma);
-}
-
 static inline void anon_vma_lock(struct vm_area_struct *vma)
 {
 	struct anon_vma *anon_vma = vma->anon_vma;
diff --git a/mm/rmap.c b/mm/rmap.c
index 8fd527c..ef6bb36 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -52,7 +52,17 @@
 
 #include <asm/tlbflush.h>
 
-struct kmem_cache *anon_vma_cachep;
+static struct kmem_cache *anon_vma_cachep;
+
+static inline struct anon_vma *anon_vma_alloc(void)
+{
+	return kmem_cache_alloc(anon_vma_cachep, GFP_KERNEL);
+}
+
+static inline void anon_vma_free(struct anon_vma *anon_vma)
+{
+	kmem_cache_free(anon_vma_cachep, anon_vma);
+}
 
 /* This must be called under the mmap_sem. */
 int anon_vma_prepare(struct vm_area_struct *vma)


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [2.6 patch] make mm/rmap.c:anon_vma_cachep static
@ 2008-04-14 18:14 Adrian Bunk
  0 siblings, 0 replies; 9+ messages in thread
From: Adrian Bunk @ 2008-04-14 18:14 UTC (permalink / raw)
  To: Rik van Riel; +Cc: linux-kernel

This patch makes the needlessly global anon_vma_cachep static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>

---

This patch has been sent on:
- 31 Mar 2008
- 25 Feb 2008

 include/linux/rmap.h |   12 ------------
 mm/rmap.c            |   12 +++++++++++-
 2 files changed, 11 insertions(+), 13 deletions(-)

8d2d63d71ecbf2db78f31025acb136c9dd4db6a2 diff --git a/include/linux/rmap.h b/include/linux/rmap.h
index 1383692..8a8dbb9 100644
--- a/include/linux/rmap.h
+++ b/include/linux/rmap.h
@@ -31,18 +31,6 @@ struct anon_vma {
 
 #ifdef CONFIG_MMU
 
-extern struct kmem_cache *anon_vma_cachep;
-
-static inline struct anon_vma *anon_vma_alloc(void)
-{
-	return kmem_cache_alloc(anon_vma_cachep, GFP_KERNEL);
-}
-
-static inline void anon_vma_free(struct anon_vma *anon_vma)
-{
-	kmem_cache_free(anon_vma_cachep, anon_vma);
-}
-
 static inline void anon_vma_lock(struct vm_area_struct *vma)
 {
 	struct anon_vma *anon_vma = vma->anon_vma;
diff --git a/mm/rmap.c b/mm/rmap.c
index 8fd527c..ef6bb36 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -52,7 +52,17 @@
 
 #include <asm/tlbflush.h>
 
-struct kmem_cache *anon_vma_cachep;
+static struct kmem_cache *anon_vma_cachep;
+
+static inline struct anon_vma *anon_vma_alloc(void)
+{
+	return kmem_cache_alloc(anon_vma_cachep, GFP_KERNEL);
+}
+
+static inline void anon_vma_free(struct anon_vma *anon_vma)
+{
+	kmem_cache_free(anon_vma_cachep, anon_vma);
+}
 
 /* This must be called under the mmap_sem. */
 int anon_vma_prepare(struct vm_area_struct *vma)


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [2.6 patch] make mm/rmap.c:anon_vma_cachep static
@ 2008-03-30 22:48 Adrian Bunk
  0 siblings, 0 replies; 9+ messages in thread
From: Adrian Bunk @ 2008-03-30 22:48 UTC (permalink / raw)
  To: Rik van Riel; +Cc: linux-kernel

This patch makes the needlessly global anon_vma_cachep static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>

---

This patch has been sent on:
- 25 Feb 2008

 include/linux/rmap.h |   12 ------------
 mm/rmap.c            |   12 +++++++++++-
 2 files changed, 11 insertions(+), 13 deletions(-)

8d2d63d71ecbf2db78f31025acb136c9dd4db6a2 diff --git a/include/linux/rmap.h b/include/linux/rmap.h
index 1383692..8a8dbb9 100644
--- a/include/linux/rmap.h
+++ b/include/linux/rmap.h
@@ -31,18 +31,6 @@ struct anon_vma {
 
 #ifdef CONFIG_MMU
 
-extern struct kmem_cache *anon_vma_cachep;
-
-static inline struct anon_vma *anon_vma_alloc(void)
-{
-	return kmem_cache_alloc(anon_vma_cachep, GFP_KERNEL);
-}
-
-static inline void anon_vma_free(struct anon_vma *anon_vma)
-{
-	kmem_cache_free(anon_vma_cachep, anon_vma);
-}
-
 static inline void anon_vma_lock(struct vm_area_struct *vma)
 {
 	struct anon_vma *anon_vma = vma->anon_vma;
diff --git a/mm/rmap.c b/mm/rmap.c
index 8fd527c..ef6bb36 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -52,7 +52,17 @@
 
 #include <asm/tlbflush.h>
 
-struct kmem_cache *anon_vma_cachep;
+static struct kmem_cache *anon_vma_cachep;
+
+static inline struct anon_vma *anon_vma_alloc(void)
+{
+	return kmem_cache_alloc(anon_vma_cachep, GFP_KERNEL);
+}
+
+static inline void anon_vma_free(struct anon_vma *anon_vma)
+{
+	kmem_cache_free(anon_vma_cachep, anon_vma);
+}
 
 /* This must be called under the mmap_sem. */
 int anon_vma_prepare(struct vm_area_struct *vma)


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-08-07 12:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-25  0:07 [2.6 patch] make mm/rmap.c:anon_vma_cachep static Adrian Bunk
2008-03-30 22:48 Adrian Bunk
2008-04-14 18:14 Adrian Bunk
2008-04-21 21:32 Adrian Bunk
2008-05-05 18:27 Adrian Bunk
2008-05-05 20:05 ` KOSAKI Motohiro
2008-05-05 20:25 ` Rik van Riel
2008-08-06 21:10 Adrian Bunk
2008-08-07 12:42 ` Hugh Dickins

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).