# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # # namei.c | 9 +++++++++ # 1 files changed, 9 insertions(+) # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 02/11/07 tytso@snap.thunk.org 1.777 # 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. # -------------------------------------------- # --- linux-2.4-ext3merge/fs/ext3/namei.c.=K0006=.orig 2003-03-13 16:22:45.000000000 +0000 +++ linux-2.4-ext3merge/fs/ext3/namei.c 2003-03-13 16:22:45.000000000 +0000 @@ -546,6 +546,15 @@ int ext3_htree_fill_tree(struct file *di 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));