mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
get rid of magic in proc_namespace.c
don't rely on proc_mounts->m being the first field; container_of() is there for purpose. No need to bother with ->private, while we are at it - the same container_of will do nicely. Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
f7a99c5b7c
commit
6ce6e24e72
3 changed files with 9 additions and 8 deletions
|
|
@ -923,7 +923,7 @@ EXPORT_SYMBOL(replace_mount_options);
|
|||
/* iterator; we want it to have access to namespace_sem, thus here... */
|
||||
static void *m_start(struct seq_file *m, loff_t *pos)
|
||||
{
|
||||
struct proc_mounts *p = container_of(m, struct proc_mounts, m);
|
||||
struct proc_mounts *p = proc_mounts(m);
|
||||
|
||||
down_read(&namespace_sem);
|
||||
return seq_list_start(&p->ns->list, *pos);
|
||||
|
|
@ -931,7 +931,7 @@ static void *m_start(struct seq_file *m, loff_t *pos)
|
|||
|
||||
static void *m_next(struct seq_file *m, void *v, loff_t *pos)
|
||||
{
|
||||
struct proc_mounts *p = container_of(m, struct proc_mounts, m);
|
||||
struct proc_mounts *p = proc_mounts(m);
|
||||
|
||||
return seq_list_next(v, &p->ns->list, pos);
|
||||
}
|
||||
|
|
@ -943,7 +943,7 @@ static void m_stop(struct seq_file *m, void *v)
|
|||
|
||||
static int m_show(struct seq_file *m, void *v)
|
||||
{
|
||||
struct proc_mounts *p = container_of(m, struct proc_mounts, m);
|
||||
struct proc_mounts *p = proc_mounts(m);
|
||||
struct mount *r = list_entry(v, struct mount, mnt_list);
|
||||
return p->show(m, &r->mnt);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue