From: Eric W. Biederman Signed-off-by: Eric W. Biederman Signed-off-by: Andrew Morton --- fs/proc/base.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff -puN fs/proc/base.c~proc-fix-the-inode-number-on-proc-pid-fd fs/proc/base.c --- devel/fs/proc/base.c~proc-fix-the-inode-number-on-proc-pid-fd 2006-02-27 20:58:54.000000000 -0800 +++ devel-akpm/fs/proc/base.c 2006-02-27 20:58:54.000000000 -0800 @@ -1187,7 +1187,8 @@ static struct inode_operations proc_pid_ static int proc_readfd(struct file * filp, void * dirent, filldir_t filldir) { - struct inode *inode = filp->f_dentry->d_inode; + struct dentry *dentry = filp->f_dentry; + struct inode *inode = dentry->d_inode; struct task_struct *p = proc_task(inode); unsigned int fd, tid, ino; int retval; @@ -1208,7 +1209,7 @@ static int proc_readfd(struct file * fil goto out; filp->f_pos++; case 1: - ino = fake_ino(tid, PROC_TID_INO); + ino = parent_ino(dentry); if (filldir(dirent, "..", 2, 1, ino, DT_DIR) < 0) goto out; filp->f_pos++; _