struct dentry * proc_pid_unhash (struct task_struct * p);
Drops the /proc/<pid> dcache entry from the hash chains.
Dropping /proc/<pid> entries and detach_pid must be synchroneous, otherwise e.g. /proc/<pid>/exe might point to the wrong executable, if the pid value is immediately reused. This is enforced by - caller must acquire spin_lock(p->proc_lock) - must be called before detach_pid - proc_pid_lookup acquires proc_lock, and checks that the target is not dead by looking at the attach count of PIDTYPE_PID.