From: "Eric W. Biederman" <ebiederm@xmission.com>
To: Andrew Morton <akpm@osdl.org>
Cc: <linux-kernel@vger.kernel.org>,
Jan Engelhardt <jengelh@linux01.gwdg.de>,
"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH 4/4] proc: Comment what proc_fill_cache does.
Date: Sat, 9 Sep 2006 22:01:05 -0600 [thread overview]
Message-ID: <1157860865556-git-send-email-ebiederm@xmission.com> (raw)
In-Reply-To: <m1venwfk43.fsf@ebiederm.dsl.xmission.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
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 433a01d..a317eb2 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -1057,6 +1057,18 @@ static struct dentry_operations pid_dent
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)
--
1.4.2.rc3.g7e18e-dirty
prev parent reply other threads:[~2006-09-10 4:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-10 3:58 [PATCH 0/4] proc: Misc cleanups Eric W. Biederman
2006-09-10 4:01 ` [PATCH 1/4] proc: Properly compute TGID_OFFSET Eric W. Biederman
2006-09-10 4:01 ` [PATCH 2/4] proc: Remove trailing blank entry from pid_entry arrays Eric W. Biederman
2006-09-10 4:01 ` [PATCH 3/4] proc: Remove the useless SMP-safe comments from /proc Eric W. Biederman
2006-09-10 4:01 ` Eric W. Biederman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1157860865556-git-send-email-ebiederm@xmission.com \
--to=ebiederm@xmission.com \
--cc=akpm@osdl.org \
--cc=jengelh@linux01.gwdg.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®