From: tytso@mit.edu
To: torvalds@transmeta.com, linux-kernel@vger.kernel.org
Subject: [PATCH] ext2/3 bugfix 2/6: readdir() needs to return '.' and '..'
Date: Wed, 06 Nov 2002 22:58:57 -0500 [thread overview]
Message-ID: <E189don-0007Ga-00@snap.thunk.org> (raw)
Add '.' and '..' entries to be returned by readdir of htree directories
This patch from Chris Li adds '.' and '..' to the rbtree so that they
are properly returned by readdir.
namei.c | 9 +++++++++
1 files changed, 9 insertions(+)
diff -Nru a/fs/ext3/namei.c b/fs/ext3/namei.c
--- a/fs/ext3/namei.c Wed Nov 6 17:29:46 2002
+++ b/fs/ext3/namei.c Wed Nov 6 17:29:46 2002
@@ -549,6 +549,15 @@
if (!frame)
return err;
+ /* Add '.' and '..' from the htree header */
+ if (!start_hash && !start_minor_hash) {
+ de = (struct ext3_dir_entry_2 *) frames[0].bh->b_data;
+ ext3_htree_store_dirent(dir_file, 0, 0, de);
+ de = ext3_next_entry(de);
+ ext3_htree_store_dirent(dir_file, 0, 0, de);
+ count += 2;
+ }
+
while (1) {
block = dx_get_block(frame->at);
dxtrace(printk("Reading block %d\n", block));
reply other threads:[~2002-11-07 3:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=E189don-0007Ga-00@snap.thunk.org \
--to=tytso@mit.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.