From: Fabio Estevam <fabio.estevam@freescale.com>
To: akpm@linux-foundation.org
Cc: linux-mm@kvack.org, festevam@gmail.com,
Fabio Estevam <fabio.estevam@freescale.com>,
Christoph Lameter <cl@linux.com>,
David Rientjes <rientjes@google.com>,
Pekka Enberg <penberg@kernel.org>
Subject: [PATCH] mm: slub: Place count_partial() outside CONFIG_SLUB_DEBUG if block
Date: Mon, 12 May 2014 09:36:30 -0300 [thread overview]
Message-ID: <1399898190-18376-1-git-send-email-fabio.estevam@freescale.com> (raw)
Commit f7f15520731 (mm-slab-suppress-out-of-memory-warning-unless-debug-is-enabled-fix)
caused the following build error when CONFIG_SLUB_DEBUG=n:
mm/slub.c:4361:5: error: implicit declaration of function 'count_partial' [-Werror=implicit-function-declaration
Place count_partial() outside CONFIG_SLUB_DEBUG if block, as it is also used
when CONFIG_SLUB_DEBUG=n.
Cc: Christoph Lameter <cl@linux.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
mm/slub.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/mm/slub.c b/mm/slub.c
index 4d5002f..0a642a4 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2127,12 +2127,6 @@ static inline int node_match(struct page *page, int node)
return 1;
}
-#ifdef CONFIG_SLUB_DEBUG
-static int count_free(struct page *page)
-{
- return page->objects - page->inuse;
-}
-
static unsigned long count_partial(struct kmem_cache_node *n,
int (*get_count)(struct page *))
{
@@ -2147,6 +2141,12 @@ static unsigned long count_partial(struct kmem_cache_node *n,
return x;
}
+#ifdef CONFIG_SLUB_DEBUG
+static int count_free(struct page *page)
+{
+ return page->objects - page->inuse;
+}
+
static inline unsigned long node_nr_objs(struct kmem_cache_node *n)
{
return atomic_long_read(&n->total_objects);
--
1.8.3.2
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next reply other threads:[~2014-05-12 12:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-12 12:36 Fabio Estevam [this message]
2014-05-12 20:35 ` [PATCH] mm: slub: Place count_partial() outside CONFIG_SLUB_DEBUG if block David Rientjes
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=1399898190-18376-1-git-send-email-fabio.estevam@freescale.com \
--to=fabio.estevam@freescale.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=festevam@gmail.com \
--cc=linux-mm@kvack.org \
--cc=penberg@kernel.org \
--cc=rientjes@google.com \
/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;
as well as URLs for NNTP newsgroup(s).