proc: Kill dead code in proc_fill_cache

Remove the questionable and redundant negative dentry handling.
(instantiate)() will return an error value, NULL with the new dentry
updated to point at an inode, or a freshly allocated dentry from
somewhere else.  (instantiate)() will never return a negative dentry,
because proc never generates negative dentries.

Remove the useless call to find_ino_number it was a hail marry attempt
to find something and as Al Viro rightly pointed out the directory
inode mutex is held during both lookup and readdir so it is not
possible for the dcache to change outside of proc_fill_cache.

Default the inode number to PROC_ROOT_INO instead of 0 to avoid having
to test for failure of finding a better inode number.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 69078c7..ff92a92 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -1646,9 +1646,8 @@
 	instantiate_t instantiate, struct task_struct *task, const void *ptr)
 {
 	struct dentry *child, *dir = filp->f_path.dentry;
-	struct inode *inode;
 	struct qstr qname;
-	ino_t ino = 0;
+	ino_t ino = PROC_ROOT_INO;
 	unsigned type = DT_UNKNOWN;
 
 	qname.name = name;
@@ -1667,19 +1666,12 @@
 				child = new;
 		}
 	}
-	if (!child || IS_ERR(child) || !child->d_inode)
-		goto end_instantiate;
-	inode = child->d_inode;
-	if (inode) {
+	if (child && !IS_ERR(child)) {
+		struct inode *inode = child->d_inode;
 		ino = inode->i_ino;
 		type = inode->i_mode >> 12;
+		dput(child);
 	}
-	dput(child);
-end_instantiate:
-	if (!ino)
-		ino = find_inode_number(dir, &qname);
-	if (!ino)
-		ino = 1;
 	return filldir(dirent, name, len, filp->f_pos, ino, type);
 }