Guarding section:
#ifndef MM_SLAB_H
#define MM_SLAB_H
...
#endif
currently doesn't cover the whole mm/slab.h. It seems like it was
done unintentionally.
Wrap the whole file by moving closing #endif to the end of it.
Signed-off-by: Andrey Ryabinin <[email protected]>
---
mm/slab.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/slab.h b/mm/slab.h
index 961a3fb..90954f5e 100644
--- a/mm/slab.h
+++ b/mm/slab.h
@@ -260,8 +260,6 @@ static inline struct kmem_cache *cache_from_obj(struct kmem_cache *s, void *x)
WARN_ON_ONCE(1);
return s;
}
-#endif
-
/*
* The slab lists for all objects.
@@ -296,3 +294,5 @@ struct kmem_cache_node {
void *slab_next(struct seq_file *m, void *p, loff_t *pos);
void slab_stop(struct seq_file *m, void *p);
+
+#endif /* MM_SLAB_H */
--
1.8.5.5
On Wed, 18 Jun 2014, Andrey Ryabinin wrote:
> Guarding section:
> #ifndef MM_SLAB_H
> #define MM_SLAB_H
> ...
> #endif
> currently doesn't cover the whole mm/slab.h. It seems like it was
> done unintentionally.
>
> Wrap the whole file by moving closing #endif to the end of it.
Acked-by: Christoph Lameter <[email protected]>
On Wed, 18 Jun 2014, Andrey Ryabinin wrote:
> Guarding section:
> #ifndef MM_SLAB_H
> #define MM_SLAB_H
> ...
> #endif
> currently doesn't cover the whole mm/slab.h. It seems like it was
> done unintentionally.
>
> Wrap the whole file by moving closing #endif to the end of it.
>
> Signed-off-by: Andrey Ryabinin <[email protected]>
Acked-by: David Rientjes <[email protected]>
Looks like
ca34956b804b ("slab: Common definition for kmem_cache_node")
e25839f67948 ("mm/slab: Sharing s_next and s_stop between slab and slub
276a2439ce79 ("mm/slab: Give s_next and s_stop slab-specific names")
added onto the header without the guard and it has been this way since
Jan 10 2013. Andrey, how did you notice that this was an issue? Simply
by visual inspection?
On Wed, Jun 18, 2014 at 06:11:35PM +0400, Andrey Ryabinin wrote:
> Guarding section:
> #ifndef MM_SLAB_H
> #define MM_SLAB_H
> ...
> #endif
> currently doesn't cover the whole mm/slab.h. It seems like it was
> done unintentionally.
>
> Wrap the whole file by moving closing #endif to the end of it.
>
> Signed-off-by: Andrey Ryabinin <[email protected]>
Reviewed-by: Vladimir Davydov <[email protected]>
On 06/19/14 00:22, David Rientjes wrote:
> On Wed, 18 Jun 2014, Andrey Ryabinin wrote:
>
>> Guarding section:
>> #ifndef MM_SLAB_H
>> #define MM_SLAB_H
>> ...
>> #endif
>> currently doesn't cover the whole mm/slab.h. It seems like it was
>> done unintentionally.
>>
>> Wrap the whole file by moving closing #endif to the end of it.
>>
>> Signed-off-by: Andrey Ryabinin <[email protected]>
>
> Acked-by: David Rientjes <[email protected]>
>
> Looks like
>
> ca34956b804b ("slab: Common definition for kmem_cache_node")
> e25839f67948 ("mm/slab: Sharing s_next and s_stop between slab and slub
> 276a2439ce79 ("mm/slab: Give s_next and s_stop slab-specific names")
>
> added onto the header without the guard and it has been this way since
> Jan 10 2013. Andrey, how did you notice that this was an issue? Simply
> by visual inspection?
>
I had to do some modifications in this file for some reasons, and for me it was hard to not
notice lack of endif in the end.
On Thu, 19 Jun 2014, Andrey Ryabinin wrote:
> I had to do some modifications in this file for some reasons, and for me it was hard to not
> notice lack of endif in the end.
>
Ok, cool, I don't think there's any need for a stable backport in that
case. Thanks for fixing it!
On Thu, 19 Jun 2014, David Rientjes wrote:
> On Thu, 19 Jun 2014, Andrey Ryabinin wrote:
>
> > I had to do some modifications in this file for some reasons, and for me it was hard to not
> > notice lack of endif in the end.
> >
>
> Ok, cool, I don't think there's any need for a stable backport in that
> case. Thanks for fixing it!
mm/slab.h is only included by mm/sl?b*.c so there is actually no effect.