diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2015-12-29 15:58:39 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-12-30 13:01:03 -0500 |
commit | fceef393a538134f03b778c5d2519e670269342f (patch) | |
tree | cd43c9afdc07852d286965ad4d11772f6c275d1a /fs/proc/thread_self.c | |
parent | cd3417c8fc9504cc1afe944515f338aff9ec286b (diff) |
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.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/proc/thread_self.c b/fs/proc/thread_self.c index 03eaa84604da..9eacd59e0360 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, | |||
20 | } | 20 | } |
21 | 21 | ||
22 | static const char *proc_thread_self_get_link(struct dentry *dentry, | 22 | static const char *proc_thread_self_get_link(struct dentry *dentry, |
23 | struct inode *inode, void **cookie) | 23 | struct inode *inode, |
24 | struct delayed_call *done) | ||
24 | { | 25 | { |
25 | struct pid_namespace *ns = inode->i_sb->s_fs_info; | 26 | struct pid_namespace *ns = inode->i_sb->s_fs_info; |
26 | pid_t tgid = task_tgid_nr_ns(current, ns); | 27 | pid_t tgid = task_tgid_nr_ns(current, ns); |
@@ -34,13 +35,13 @@ static const char *proc_thread_self_get_link(struct dentry *dentry, | |||
34 | if (unlikely(!name)) | 35 | if (unlikely(!name)) |
35 | return dentry ? ERR_PTR(-ENOMEM) : ERR_PTR(-ECHILD); | 36 | return dentry ? ERR_PTR(-ENOMEM) : ERR_PTR(-ECHILD); |
36 | sprintf(name, "%d/task/%d", tgid, pid); | 37 | sprintf(name, "%d/task/%d", tgid, pid); |
37 | return *cookie = name; | 38 | set_delayed_call(done, kfree_link, name); |
39 | return name; | ||
38 | } | 40 | } |
39 | 41 | ||
40 | static const struct inode_operations proc_thread_self_inode_operations = { | 42 | static const struct inode_operations proc_thread_self_inode_operations = { |
41 | .readlink = proc_thread_self_readlink, | 43 | .readlink = proc_thread_self_readlink, |
42 | .get_link = proc_thread_self_get_link, | 44 | .get_link = proc_thread_self_get_link, |
43 | .put_link = kfree_put_link, | ||
44 | }; | 45 | }; |
45 | 46 | ||
46 | static unsigned thread_self_inum; | 47 | static unsigned thread_self_inum; |