Messages in this thread Patch in this message | | | Date | Wed, 19 Aug 2009 18:39:59 +0800 | From | Amerigo Wang <> | Subject | Re: [Patch] proc: drop write permission on 'timer_list' and 'slabinfo' |
| |
Wu Fengguang wrote: > On Wed, Aug 19, 2009 at 10:36:30AM +0800, Amerigo Wang wrote: > >> Wu Fengguang wrote: >> >>> On Tue, Aug 18, 2009 at 11:08:30AM +0800, Amerigo Wang wrote: >>> >>> >>> >>>> - proc_create("slabinfo",S_IWUSR|S_IRUGO,NULL,&proc_slabinfo_operations); >>>> + proc_create("slabinfo",S_IRUGO,NULL,&proc_slabinfo_operations); >>>> >>>> >>> Style nitpick. The spaces were packed to fit into 80-col I guess. >>> >>> >>> >> Yeah, I noticed this too, the reason I didn't fix this is that I don't >> want to mix coding style fix with this one. We can fix it in another >> patch, if you want. :) >> > > Why not? This don't hurt readability of the patch, hehe. >
Here we go.
Pekka, could you please also take the patch attached below? It is just a trivial coding style fix. And it is based on the my previous patch.
Thanks!
Signed-off-by: WANG Cong <amwang@redhat.com>
diff --git a/mm/slub.c b/mm/slub.c index 61398c0..1cd60ff 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -1109,8 +1109,7 @@ static struct page *allocate_slab(struct kmem_cache *s, gfp_t flags, int node) } if (kmemcheck_enabled - && !(s->flags & (SLAB_NOTRACK | DEBUG_DEFAULT_FLAGS))) - { + && !(s->flags & (SLAB_NOTRACK | DEBUG_DEFAULT_FLAGS))) { int pages = 1 << oo_order(oo); kmemcheck_alloc_shadow(page, oo_order(oo), flags, node); @@ -2001,7 +2000,7 @@ static inline int calculate_order(int size) return order; fraction /= 2; } - min_objects --; + min_objects--; } /* @@ -4726,7 +4725,7 @@ static const struct file_operations proc_slabinfo_operations = { static int __init slab_proc_init(void) { - proc_create("slabinfo",S_IRUGO,NULL,&proc_slabinfo_operations); + proc_create("slabinfo", S_IRUGO, NULL, &proc_slabinfo_operations); return 0; } module_init(slab_proc_init); | |