Whamcloud - gitweb
b=3244
[fs/lustre-release.git] / lustre / kernel_patches / patches / ext3-nlinks-2.4.20-hp_pnnl.patch
index 3273075..40121ae 100644 (file)
@@ -1,8 +1,8 @@
 Index: linux/fs/ext3/namei.c
 ===================================================================
---- linux.orig/fs/ext3/namei.c Wed Aug 25 11:34:25 2004
-+++ linux/fs/ext3/namei.c      Wed Aug 25 13:16:03 2004
-@@ -1541,11 +1541,17 @@
+--- linux.orig/fs/ext3/namei.c
++++ linux/fs/ext3/namei.c
+@@ -1549,11 +1549,17 @@ static int ext3_delete_entry (handle_t *
  static inline void ext3_inc_count(handle_t *handle, struct inode *inode)
  {
        inode->i_nlink++;
@@ -21,7 +21,7 @@ Index: linux/fs/ext3/namei.c
  }
  
  static int ext3_add_nondir(handle_t *handle,
-@@ -1646,7 +1651,7 @@
+@@ -1654,7 +1660,7 @@ static int ext3_mkdir(struct inode * dir
        struct ext3_dir_entry_2 * de;
        int err;
  
@@ -30,7 +30,7 @@ Index: linux/fs/ext3/namei.c
                return -EMLINK;
  
        handle = ext3_journal_start(dir, EXT3_DATA_TRANS_BLOCKS +
-@@ -1668,7 +1673,7 @@
+@@ -1676,7 +1682,7 @@ static int ext3_mkdir(struct inode * dir
        inode->i_size = EXT3_I(inode)->i_disksize = inode->i_sb->s_blocksize;
        dir_block = ext3_bread (handle, inode, 0, 1, &err);
        if (!dir_block) {
@@ -39,7 +39,7 @@ Index: linux/fs/ext3/namei.c
                ext3_mark_inode_dirty(handle, inode);
                iput (inode);
                goto out_stop;
-@@ -1700,7 +1705,7 @@
+@@ -1708,7 +1714,7 @@ static int ext3_mkdir(struct inode * dir
                iput (inode);
                goto out_stop;
        }
@@ -48,7 +48,7 @@ Index: linux/fs/ext3/namei.c
        ext3_update_dx_flag(dir);
        ext3_mark_inode_dirty(handle, dir);
        d_instantiate(dentry, inode);
-@@ -1761,10 +1766,11 @@
+@@ -1769,10 +1775,11 @@ static int empty_dir (struct inode * ino
                        }
                        de = (struct ext3_dir_entry_2 *) bh->b_data;
                }
@@ -64,7 +64,7 @@ Index: linux/fs/ext3/namei.c
                }
                if (le32_to_cpu(de->inode)) {
                        brelse (bh);
-@@ -1957,14 +1963,14 @@
+@@ -1965,14 +1972,14 @@ static int ext3_rmdir (struct inode * di
        retval = ext3_delete_entry(handle, dir, de, bh);
        if (retval)
                goto end_rmdir;
@@ -84,7 +84,7 @@ Index: linux/fs/ext3/namei.c
        inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME;
        ext3_mark_inode_dirty(handle, inode);
        ext3_update_dx_flag(dir);
-@@ -2016,7 +2022,7 @@
+@@ -2024,7 +2031,7 @@ static int ext3_unlink(struct inode * di
        dir->i_ctime = dir->i_mtime = CURRENT_TIME;
        ext3_update_dx_flag(dir);
        ext3_mark_inode_dirty(handle, dir);
@@ -93,7 +93,7 @@ Index: linux/fs/ext3/namei.c
        if (!inode->i_nlink)
                ext3_orphan_add(handle, inode);
        inode->i_ctime = dir->i_ctime;
-@@ -2108,9 +2114,8 @@
+@@ -2116,9 +2123,8 @@ static int ext3_link (struct dentry * ol
        if (S_ISDIR(inode->i_mode))
                return -EPERM;
  
@@ -104,7 +104,7 @@ Index: linux/fs/ext3/namei.c
  
        handle = ext3_journal_start(dir, EXT3_DATA_TRANS_BLOCKS +
                                        EXT3_INDEX_EXTRA_TRANS_BLOCKS);
-@@ -2194,8 +2199,8 @@
+@@ -2202,8 +2208,8 @@ static int ext3_rename (struct inode * o
                if (le32_to_cpu(PARENT_INO(dir_bh->b_data)) != old_dir->i_ino)
                        goto end_rename;
                retval = -EMLINK;
@@ -115,7 +115,7 @@ Index: linux/fs/ext3/namei.c
                        goto end_rename;
        }
        if (!new_bh) {
-@@ -2253,7 +2258,7 @@
+@@ -2261,7 +2267,7 @@ static int ext3_rename (struct inode * o
        }
  
        if (new_inode) {
@@ -124,7 +124,7 @@ Index: linux/fs/ext3/namei.c
                new_inode->i_ctime = CURRENT_TIME;
        }
        old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME;
-@@ -2264,11 +2269,13 @@
+@@ -2272,11 +2278,13 @@ static int ext3_rename (struct inode * o
                PARENT_INO(dir_bh->b_data) = le32_to_cpu(new_dir->i_ino);
                BUFFER_TRACE(dir_bh, "call ext3_journal_dirty_metadata");
                ext3_journal_dirty_metadata(handle, dir_bh);
@@ -143,9 +143,9 @@ Index: linux/fs/ext3/namei.c
                }
 Index: linux/include/linux/ext3_fs.h
 ===================================================================
---- linux.orig/include/linux/ext3_fs.h Wed Aug 25 11:34:27 2004
-+++ linux/include/linux/ext3_fs.h      Wed Aug 25 13:14:48 2004
-@@ -79,7 +81,7 @@
+--- linux.orig/include/linux/ext3_fs.h
++++ linux/include/linux/ext3_fs.h
+@@ -79,7 +79,7 @@
  /*
   * Maximal count of links to a file
   */
@@ -154,3 +154,19 @@ Index: linux/include/linux/ext3_fs.h
  
  /*
   * Macro-instructions used to manage several block sizes
+@@ -503,6 +503,7 @@ struct ext3_super_block {
+ #define EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER   0x0001
+ #define EXT3_FEATURE_RO_COMPAT_LARGE_FILE     0x0002
+ #define EXT3_FEATURE_RO_COMPAT_BTREE_DIR      0x0004
++#define EXT3_FEATURE_RO_COMPAT_DIR_NLINK      0x0020
+ #define EXT3_FEATURE_INCOMPAT_COMPRESSION     0x0001
+ #define EXT3_FEATURE_INCOMPAT_FILETYPE                0x0002
+@@ -516,6 +517,7 @@ struct ext3_super_block {
+                                        EXT3_FEATURE_INCOMPAT_EXTENTS)
+ #define EXT3_FEATURE_RO_COMPAT_SUPP   (EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER| \
+                                        EXT3_FEATURE_RO_COMPAT_LARGE_FILE| \
++                                       EXT3_FEATURE_RO_COMPAT_DIR_NLINK| \
+                                        EXT3_FEATURE_RO_COMPAT_BTREE_DIR)
+ /*