aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-06-09 01:16:59 -0400
committerZiyan <jaraidaniel@gmail.com>2016-03-11 16:08:08 +0100
commit4bcd71f9a3f92ac70bece1363a2e0fe46d6fc281 (patch)
tree18315dc86241b3f489b77337ad1d67e536910a2e /fs/proc
parent4f8df79100cd09c3d82a1c770fa0d86d5f1f5f5f (diff)
downloadkernel_samsung_espresso10-4bcd71f9a3f92ac70bece1363a2e0fe46d6fc281.zip
kernel_samsung_espresso10-4bcd71f9a3f92ac70bece1363a2e0fe46d6fc281.tar.gz
kernel_samsung_espresso10-4bcd71f9a3f92ac70bece1363a2e0fe46d6fc281.tar.bz2
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 <viro@zeniv.linux.org.uk> (cherry picked from commit 6ce6e24e72233073c8ead9419fc5040d44803dae)
Diffstat (limited to 'fs/proc')
-rw-r--r--fs/proc/base.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 49a048d..c72b0a1 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -624,7 +624,6 @@ static int mounts_open_common(struct inode *inode, struct file *file,
if (ret)
goto err_free;
- p->m.private = p;
p->ns = ns;
p->root = root;
p->event = ns->event;
@@ -643,7 +642,7 @@ static int mounts_open_common(struct inode *inode, struct file *file,
static int mounts_release(struct inode *inode, struct file *file)
{
- struct proc_mounts *p = file->private_data;
+ struct proc_mounts *p = proc_mounts(file->private_data);
path_put(&p->root);
put_mnt_ns(p->ns);
return seq_release(inode, file);
@@ -651,7 +650,7 @@ static int mounts_release(struct inode *inode, struct file *file)
static unsigned mounts_poll(struct file *file, poll_table *wait)
{
- struct proc_mounts *p = file->private_data;
+ struct proc_mounts *p = proc_mounts(file->private_data);
unsigned res = POLLIN | POLLRDNORM;
poll_wait(file, &p->ns->poll, wait);