summaryrefslogtreecommitdiffstats
path: root/fs/proc/thread_self.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2015-12-29 15:58:39 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2015-12-30 13:01:03 -0500
commitfceef393a538134f03b778c5d2519e670269342f (patch)
treecd43c9afdc07852d286965ad4d11772f6c275d1a /fs/proc/thread_self.c
parentcd3417c8fc9504cc1afe944515f338aff9ec286b (diff)
downloadop-kernel-dev-fceef393a538134f03b778c5d2519e670269342f.zip
op-kernel-dev-fceef393a538134f03b778c5d2519e670269342f.tar.gz
switch ->get_link() to delayed_call, kill ->put_link()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/proc/thread_self.c')
-rw-r--r--fs/proc/thread_self.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/proc/thread_self.c b/fs/proc/thread_self.c
index 03eaa84..9eacd59 100644
--- a/fs/proc/thread_self.c
+++ b/fs/proc/thread_self.c
@@ -20,7 +20,8 @@ static int proc_thread_self_readlink(struct dentry *dentry, char __user *buffer,
}
static const char *proc_thread_self_get_link(struct dentry *dentry,
- struct inode *inode, void **cookie)
+ struct inode *inode,
+ struct delayed_call *done)
{
struct pid_namespace *ns = inode->i_sb->s_fs_info;
pid_t tgid = task_tgid_nr_ns(current, ns);
@@ -34,13 +35,13 @@ static const char *proc_thread_self_get_link(struct dentry *dentry,
if (unlikely(!name))
return dentry ? ERR_PTR(-ENOMEM) : ERR_PTR(-ECHILD);
sprintf(name, "%d/task/%d", tgid, pid);
- return *cookie = name;
+ set_delayed_call(done, kfree_link, name);
+ return name;
}
static const struct inode_operations proc_thread_self_inode_operations = {
.readlink = proc_thread_self_readlink,
.get_link = proc_thread_self_get_link,
- .put_link = kfree_put_link,
};
static unsigned thread_self_inum;
OpenPOWER on IntegriCloud