aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2011-06-18 23:34:09 -0700
committerEric W. Biederman <ebiederm@aristanetworks.com>2011-08-08 13:46:24 -0500
commite2989f42d3fe64837849b304d960db9f76d79c59 (patch)
tree8bdd932c704dd3fac30f79e296a7bdcef1398414
parent02f8c6aee8df3cdc935e9bdd4f2d020306035dbe (diff)
downloadlinux-namespace-control-devel-e2989f42d3fe64837849b304d960db9f76d79c59.tar.gz
proc: Use d_set_d_op in the namespace file descriptor code
Without this none of the pid_dentry_operations methods will be called and we can slowly leak namespace file descriptors. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
-rw-r--r--fs/proc/namespaces.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/proc/namespaces.c b/fs/proc/namespaces.c
index be177f702acbc9..d6c078ea148985 100644
--- a/fs/proc/namespaces.c
+++ b/fs/proc/namespaces.c
@@ -54,7 +54,7 @@ static struct dentry *proc_ns_instantiate(struct inode *dir,
ei->ns_ops = ns_ops;
ei->ns = ns;
- dentry->d_op = &pid_dentry_operations;
+ d_set_d_op(dentry, &pid_dentry_operations);
d_add(dentry, inode);
/* Close the race of the process dying before we return the dentry */
if (pid_revalidate(dentry, NULL))