diff options
author | Ingo Molnar <mingo@kernel.org> | 2016-09-15 02:24:53 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-09-15 02:24:53 -0400 |
commit | d4b80afbba49e968623330f1336da8c724da8aad (patch) | |
tree | a9478bd77d8b001a6a7119328d34e9666d7bfe93 /fs/proc/base.c | |
parent | fcd709ef20a9d83bdb7524d27cd6719dac8690a0 (diff) | |
parent | 4cea8776571b18db7485930cb422faa739580c8c (diff) |
Merge branch 'linus' into x86/asm, to pick up recent fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'fs/proc/base.c')
-rw-r--r-- | fs/proc/base.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index e9ff186c723f..3b792ab3c0dc 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -1556,18 +1556,13 @@ static const struct file_operations proc_pid_set_comm_operations = { | |||
1556 | static int proc_exe_link(struct dentry *dentry, struct path *exe_path) | 1556 | static int proc_exe_link(struct dentry *dentry, struct path *exe_path) |
1557 | { | 1557 | { |
1558 | struct task_struct *task; | 1558 | struct task_struct *task; |
1559 | struct mm_struct *mm; | ||
1560 | struct file *exe_file; | 1559 | struct file *exe_file; |
1561 | 1560 | ||
1562 | task = get_proc_task(d_inode(dentry)); | 1561 | task = get_proc_task(d_inode(dentry)); |
1563 | if (!task) | 1562 | if (!task) |
1564 | return -ENOENT; | 1563 | return -ENOENT; |
1565 | mm = get_task_mm(task); | 1564 | exe_file = get_task_exe_file(task); |
1566 | put_task_struct(task); | 1565 | put_task_struct(task); |
1567 | if (!mm) | ||
1568 | return -ENOENT; | ||
1569 | exe_file = get_mm_exe_file(mm); | ||
1570 | mmput(mm); | ||
1571 | if (exe_file) { | 1566 | if (exe_file) { |
1572 | *exe_path = exe_file->f_path; | 1567 | *exe_path = exe_file->f_path; |
1573 | path_get(&exe_file->f_path); | 1568 | path_get(&exe_file->f_path); |