Commit 8b97b21e authored by Linus Torvalds's avatar Linus Torvalds
parents 99a15e21 79392533
...@@ -38,18 +38,21 @@ static struct dentry *proc_ns_instantiate(struct inode *dir, ...@@ -38,18 +38,21 @@ static struct dentry *proc_ns_instantiate(struct inode *dir,
struct inode *inode; struct inode *inode;
struct proc_inode *ei; struct proc_inode *ei;
struct dentry *error = ERR_PTR(-ENOENT); struct dentry *error = ERR_PTR(-ENOENT);
void *ns;
inode = proc_pid_make_inode(dir->i_sb, task); inode = proc_pid_make_inode(dir->i_sb, task);
if (!inode) if (!inode)
goto out; goto out;
ns = ns_ops->get(task);
if (!ns)
goto out_iput;
ei = PROC_I(inode); ei = PROC_I(inode);
inode->i_mode = S_IFREG|S_IRUSR; inode->i_mode = S_IFREG|S_IRUSR;
inode->i_fop = &ns_file_operations; inode->i_fop = &ns_file_operations;
ei->ns_ops = ns_ops; ei->ns_ops = ns_ops;
ei->ns = ns_ops->get(task); ei->ns = ns;
if (!ei->ns)
goto out_iput;
dentry->d_op = &pid_dentry_operations; dentry->d_op = &pid_dentry_operations;
d_add(dentry, inode); d_add(dentry, inode);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment