diff --git a/fs/proc/base.c b/fs/proc/base.c index 11375216b493b7ac69f3d994c8b9990e0e138c8a..35afb2eb4a6f5519b35c2f9696c119b97309ea93 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -2780,7 +2780,7 @@ static int proc_pid_instantiate(struct inode *dir, struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, unsigned int flags) { - int result = 0; + int result = -ENOENT; struct task_struct *task; unsigned tgid; struct pid_namespace *ns; diff --git a/fs/proc/root.c b/fs/proc/root.c index 5dbadecb234da01be9cc7eb5705e71363da7dfea..574bafc41f0b7c1f77160971ebb9ca6d5a8121e6 100644 --- a/fs/proc/root.c +++ b/fs/proc/root.c @@ -199,10 +199,10 @@ static int proc_root_getattr(struct vfsmount *mnt, struct dentry *dentry, struct static struct dentry *proc_root_lookup(struct inode * dir, struct dentry * dentry, unsigned int flags) { - if (!proc_lookup(dir, dentry, flags)) + if (!proc_pid_lookup(dir, dentry, flags)) return NULL; - return proc_pid_lookup(dir, dentry, flags); + return proc_lookup(dir, dentry, flags); } static int proc_root_readdir(struct file *file, struct dir_context *ctx)