diff options
| author | Maxime Ripard <maxime.ripard@free-electrons.com> | 2013-04-08 21:36:54 +0200 | 
|---|---|---|
| committer | Maxime Ripard <maxime.ripard@free-electrons.com> | 2013-04-08 21:36:54 +0200 | 
| commit | 0b824f8dad9fdfc7c1bf9c1d3ac744075eb73ec6 (patch) | |
| tree | 7559859702f2fa02f6a4db64cf10f6c2e3f80c21 /fs/proc/namespaces.c | |
| parent | 6dbe51c251a327e012439c4772097a13df43c5b8 (diff) | |
| parent | 3d5a96582303e28c48699f3faaf920ef7d43e6f2 (diff) | |
| download | olio-linux-3.10-0b824f8dad9fdfc7c1bf9c1d3ac744075eb73ec6.tar.xz olio-linux-3.10-0b824f8dad9fdfc7c1bf9c1d3ac744075eb73ec6.zip  | |
Merge remote-tracking branch 'arm-soc/clksrc/cleanup' into sunxi/core-for-3.10
Diffstat (limited to 'fs/proc/namespaces.c')
| -rw-r--r-- | fs/proc/namespaces.c | 12 | 
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/proc/namespaces.c b/fs/proc/namespaces.c index b7a47196c8c..66b51c0383d 100644 --- a/fs/proc/namespaces.c +++ b/fs/proc/namespaces.c @@ -118,7 +118,7 @@ static void *proc_ns_follow_link(struct dentry *dentry, struct nameidata *nd)  	struct super_block *sb = inode->i_sb;  	struct proc_inode *ei = PROC_I(inode);  	struct task_struct *task; -	struct dentry *ns_dentry; +	struct path ns_path;  	void *error = ERR_PTR(-EACCES);  	task = get_proc_task(inode); @@ -128,14 +128,14 @@ static void *proc_ns_follow_link(struct dentry *dentry, struct nameidata *nd)  	if (!ptrace_may_access(task, PTRACE_MODE_READ))  		goto out_put_task; -	ns_dentry = proc_ns_get_dentry(sb, task, ei->ns_ops); -	if (IS_ERR(ns_dentry)) { -		error = ERR_CAST(ns_dentry); +	ns_path.dentry = proc_ns_get_dentry(sb, task, ei->ns_ops); +	if (IS_ERR(ns_path.dentry)) { +		error = ERR_CAST(ns_path.dentry);  		goto out_put_task;  	} -	dput(nd->path.dentry); -	nd->path.dentry = ns_dentry; +	ns_path.mnt = mntget(nd->path.mnt); +	nd_jump_link(nd, &ns_path);  	error = NULL;  out_put_task:  |