Whamcloud - gitweb
b=10651
[fs/lustre-release.git] / lustre / kernel_patches / patches / ext-2.4-patch-2.patch
1 # This is a BitKeeper generated patch for the following project:
2 # Project Name: Linux kernel tree
3 #
4 # namei.c |    9 +++++++++
5 # 1 files changed, 9 insertions(+)
6 #
7 # The following is the BitKeeper ChangeSet Log
8 # --------------------------------------------
9 # 02/11/07      tytso@snap.thunk.org    1.777
10 # Add '.' and '..' entries to be returned by readdir of htree directories
11
12 # This patch from Chris Li adds '.' and '..' to the rbtree so that they 
13 # are properly returned by readdir.
14 # --------------------------------------------
15 #
16 diff -Nru a/fs/ext3/namei.c b/fs/ext3/namei.c
17 --- a/fs/ext3/namei.c   Thu Nov  7 10:57:30 2002
18 +++ b/fs/ext3/namei.c   Thu Nov  7 10:57:30 2002
19 @@ -546,6 +546,15 @@
20         if (!frame)
21                 return err;
22  
23 +       /* Add '.' and '..' from the htree header */
24 +       if (!start_hash && !start_minor_hash) {
25 +               de = (struct ext3_dir_entry_2 *) frames[0].bh->b_data;
26 +               ext3_htree_store_dirent(dir_file, 0, 0, de);
27 +               de = ext3_next_entry(de);
28 +               ext3_htree_store_dirent(dir_file, 0, 0, de);
29 +               count += 2;
30 +       }
31 +
32         while (1) {
33                 block = dx_get_block(frame->at);
34                 dxtrace(printk("Reading block %d\n", block));