]> rtime.felk.cvut.cz Git - hercules2020/nv-tegra/linux-4.4.git/commit
mm: introduce get_task_exe_file
authorMateusz Guzik <mguzik@redhat.com>
Tue, 23 Aug 2016 14:20:38 +0000 (16:20 +0200)
committerIshan Mittal <imittal@nvidia.com>
Fri, 6 Jan 2017 10:12:14 +0000 (15:42 +0530)
commitae434b7bb9b829646fcb5f89c37af658e99823b4
treec6b0636e5eb070d3b07d2d52805fe90aeed93780
parent12320f151e1788d094d0065d1ae6d3918ed65492
mm: introduce get_task_exe_file

commit cd81a9170e69e018bbaba547c1fd85a585f5697a upstream.

For more convenient access if one has a pointer to the task.

As a minor nit take advantage of the fact that only task lock + rcu are
needed to safely grab ->exe_file. This saves mm refcount dance.

Use the helper in proc_exe_link.

Signed-off-by: Mateusz Guzik <mguzik@redhat.com>
Acked-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Acked-by: Richard Guy Briggs <rgb@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/proc/base.c
include/linux/mm.h
kernel/fork.c