diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2006-10-02 05:18:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-02 10:57:25 -0400 |
commit | 1c0d04c9e44f4a248335c33d2be7c7f7b06ff359 (patch) | |
tree | 6eb913a14a86311158e9a36cc28cd765b179b023 | |
parent | 5e61feafa2c641c2a013ba94eec56c411011cc94 (diff) |
[PATCH] proc: comment what proc_fill_cache does
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | fs/proc/base.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index 433a01d2e992..a317eb2c4442 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -1057,6 +1057,18 @@ static struct dentry_operations pid_dentry_operations = | |||
1057 | 1057 | ||
1058 | typedef struct dentry *instantiate_t(struct inode *, struct dentry *, struct task_struct *, void *); | 1058 | typedef struct dentry *instantiate_t(struct inode *, struct dentry *, struct task_struct *, void *); |
1059 | 1059 | ||
1060 | /* | ||
1061 | * Fill a directory entry. | ||
1062 | * | ||
1063 | * If possible create the dcache entry and derive our inode number and | ||
1064 | * file type from dcache entry. | ||
1065 | * | ||
1066 | * Since all of the proc inode numbers are dynamically generated, the inode | ||
1067 | * numbers do not exist until the inode is cache. This means creating the | ||
1068 | * the dcache entry in readdir is necessary to keep the inode numbers | ||
1069 | * reported by readdir in sync with the inode numbers reported | ||
1070 | * by stat. | ||
1071 | */ | ||
1060 | static int proc_fill_cache(struct file *filp, void *dirent, filldir_t filldir, | 1072 | static int proc_fill_cache(struct file *filp, void *dirent, filldir_t filldir, |
1061 | char *name, int len, | 1073 | char *name, int len, |
1062 | instantiate_t instantiate, struct task_struct *task, void *ptr) | 1074 | instantiate_t instantiate, struct task_struct *task, void *ptr) |