From bddac130ed61944fd2bf0c3f7e40cfc5a023d990 Mon Sep 17 00:00:00 2001 From: "Eric W. Biederman" Date: Mon, 2 Oct 2006 02:18:57 -0700 Subject: [PATCH] --- yaml --- r: 37861 b: refs/heads/master c: 1c0d04c9e44f4a248335c33d2be7c7f7b06ff359 h: refs/heads/master i: 37859: b1e393f10920a1451692e08bd59287d8cd7a17fd v: v3 --- [refs] | 2 +- trunk/fs/proc/base.c | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index d5e7b6c6391d..c21d80e7702c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5e61feafa2c641c2a013ba94eec56c411011cc94 +refs/heads/master: 1c0d04c9e44f4a248335c33d2be7c7f7b06ff359 diff --git a/trunk/fs/proc/base.c b/trunk/fs/proc/base.c index 433a01d2e992..a317eb2c4442 100644 --- a/trunk/fs/proc/base.c +++ b/trunk/fs/proc/base.c @@ -1057,6 +1057,18 @@ static struct dentry_operations pid_dentry_operations = typedef struct dentry *instantiate_t(struct inode *, struct dentry *, struct task_struct *, void *); +/* + * Fill a directory entry. + * + * If possible create the dcache entry and derive our inode number and + * file type from dcache entry. + * + * Since all of the proc inode numbers are dynamically generated, the inode + * numbers do not exist until the inode is cache. This means creating the + * the dcache entry in readdir is necessary to keep the inode numbers + * reported by readdir in sync with the inode numbers reported + * by stat. + */ static int proc_fill_cache(struct file *filp, void *dirent, filldir_t filldir, char *name, int len, instantiate_t instantiate, struct task_struct *task, void *ptr)