-
Kir Kolyshkin authored
...and make it correctly print the file name we were unable to open. Also, error from fdopen[dir]() is now reported with file name as well. Note that open_proc() and friends need to be macros in order for pr_perror() to show actual file name and line number where error occured. Historical note: the original version of this patch was way more radical, changing openat() to open() and thus removing pid_dir (replacing with pid when needed) and open_proc_dir(), changing openat() to open(). The word from Pavel is he wants to keep the openat/pid_dir optimization because it saves two dentry lookups in kernel code for each open(). Because of this optimization (and desire to print correct file name in case of error) we have to carry both pid and pid_dir everywhere. Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
5661d806