projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ath10k: rename board_data in struct ath10k
[cascardo/linux.git]
/
mm
/
slab_common.c
diff --git
a/mm/slab_common.c
b/mm/slab_common.c
index
2d41450
..
538bade
100644
(file)
--- a/
mm/slab_common.c
+++ b/
mm/slab_common.c
@@
-497,6
+497,13
@@
void __init create_kmalloc_caches(unsigned long flags)
#ifdef CONFIG_SLABINFO
#ifdef CONFIG_SLABINFO
+
+#ifdef CONFIG_SLAB
+#define SLABINFO_RIGHTS (S_IWUSR | S_IRUSR)
+#else
+#define SLABINFO_RIGHTS S_IRUSR
+#endif
+
void print_slabinfo_header(struct seq_file *m)
{
/*
void print_slabinfo_header(struct seq_file *m)
{
/*
@@
-531,12
+538,12
@@
static void *s_start(struct seq_file *m, loff_t *pos)
return seq_list_start(&slab_caches, *pos);
}
return seq_list_start(&slab_caches, *pos);
}
-
static void *s
_next(struct seq_file *m, void *p, loff_t *pos)
+
void *slab
_next(struct seq_file *m, void *p, loff_t *pos)
{
return seq_list_next(p, &slab_caches, pos);
}
{
return seq_list_next(p, &slab_caches, pos);
}
-
static void s
_stop(struct seq_file *m, void *p)
+
void slab
_stop(struct seq_file *m, void *p)
{
mutex_unlock(&slab_mutex);
}
{
mutex_unlock(&slab_mutex);
}
@@
-613,8
+620,8
@@
static int s_show(struct seq_file *m, void *p)
*/
static const struct seq_operations slabinfo_op = {
.start = s_start,
*/
static const struct seq_operations slabinfo_op = {
.start = s_start,
- .next = s_next,
- .stop = s_stop,
+ .next = s
lab
_next,
+ .stop = s
lab
_stop,
.show = s_show,
};
.show = s_show,
};
@@
-633,7
+640,8
@@
static const struct file_operations proc_slabinfo_operations = {
static int __init slab_proc_init(void)
{
static int __init slab_proc_init(void)
{
- proc_create("slabinfo", S_IRUSR, NULL, &proc_slabinfo_operations);
+ proc_create("slabinfo", SLABINFO_RIGHTS, NULL,
+ &proc_slabinfo_operations);
return 0;
}
module_init(slab_proc_init);
return 0;
}
module_init(slab_proc_init);