Whamcloud - gitweb
b=3244
[fs/lustre-release.git] / lustre / kernel_patches / patches / ext3-nlinks-2.4.21-chaos.patch
index 4c3ebb8..5956284 100644 (file)
@@ -1,8 +1,8 @@
-Index: 69chaos/fs/ext3/namei.c
+Index: linux-2.4.21/fs/ext3/namei.c
 ===================================================================
---- 69chaos.orig/fs/ext3/namei.c       2004-08-24 23:56:04.000000000 -0700
-+++ 69chaos/fs/ext3/namei.c    2004-08-24 23:57:20.000000000 -0700
-@@ -1542,11 +1542,17 @@
+--- linux-2.4.21.orig/fs/ext3/namei.c
++++ linux-2.4.21/fs/ext3/namei.c
+@@ -1550,11 +1550,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: 69chaos/fs/ext3/namei.c
  }
  
  static int ext3_add_nondir(handle_t *handle,
-@@ -1650,7 +1655,7 @@
+@@ -1658,7 +1664,7 @@ static int ext3_mkdir(struct inode * dir
        struct ext3_dir_entry_2 * de;
        int err;
  
@@ -30,7 +30,7 @@ Index: 69chaos/fs/ext3/namei.c
                return -EMLINK;
  
        handle = ext3_journal_start(dir, EXT3_DATA_TRANS_BLOCKS +
-@@ -1672,7 +1677,7 @@
+@@ -1680,7 +1686,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: 69chaos/fs/ext3/namei.c
                ext3_mark_inode_dirty(handle, inode);
                iput (inode);
                goto out_stop;
-@@ -1704,7 +1709,7 @@
+@@ -1712,7 +1718,7 @@ static int ext3_mkdir(struct inode * dir
                iput (inode);
                goto out_stop;
        }
@@ -48,7 +48,7 @@ Index: 69chaos/fs/ext3/namei.c
        ext3_update_dx_flag(dir);
        ext3_mark_inode_dirty(handle, dir);
        d_instantiate(dentry, inode);
-@@ -1765,10 +1770,11 @@
+@@ -1773,10 +1779,11 @@ static int empty_dir (struct inode * ino
                        }
                        de = (struct ext3_dir_entry_2 *) bh->b_data;
                }
@@ -64,7 +64,7 @@ Index: 69chaos/fs/ext3/namei.c
                }
                if (le32_to_cpu(de->inode)) {
                        brelse (bh);
-@@ -1960,14 +1966,14 @@
+@@ -1968,14 +1975,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: 69chaos/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);
-@@ -2019,7 +2025,7 @@
+@@ -2061,7 +2068,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: 69chaos/fs/ext3/namei.c
        if (!inode->i_nlink) {
                ext3_try_to_delay_deletion(inode);
                ext3_orphan_add(handle, inode);
-@@ -2111,9 +2117,8 @@
+@@ -2155,9 +2162,8 @@ static int ext3_link (struct dentry * ol
        if (S_ISDIR(inode->i_mode))
                return -EPERM;
  
@@ -104,7 +104,7 @@ Index: 69chaos/fs/ext3/namei.c
  
        handle = ext3_journal_start(dir, EXT3_DATA_TRANS_BLOCKS +
                                        EXT3_INDEX_EXTRA_TRANS_BLOCKS);
-@@ -2197,8 +2202,8 @@
+@@ -2241,8 +2247,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: 69chaos/fs/ext3/namei.c
                        goto end_rename;
        }
        if (!new_bh) {
-@@ -2256,7 +2261,7 @@
+@@ -2300,7 +2306,7 @@ static int ext3_rename (struct inode * o
        }
  
        if (new_inode) {
@@ -124,7 +124,7 @@ Index: 69chaos/fs/ext3/namei.c
                new_inode->i_ctime = CURRENT_TIME;
        }
        old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME;
-@@ -2267,11 +2272,13 @@
+@@ -2311,11 +2317,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);
@@ -141,11 +141,11 @@ Index: 69chaos/fs/ext3/namei.c
                        ext3_update_dx_flag(new_dir);
                        ext3_mark_inode_dirty(handle, new_dir);
                }
-Index: 69chaos/include/linux/ext3_fs.h
+Index: linux-2.4.21/include/linux/ext3_fs.h
 ===================================================================
---- 69chaos.orig/include/linux/ext3_fs.h       2004-08-24 23:55:45.000000000 -0700
-+++ 69chaos/include/linux/ext3_fs.h    2004-08-24 23:56:47.000000000 -0700
-@@ -79,7 +81,7 @@
+--- linux-2.4.21.orig/include/linux/ext3_fs.h
++++ linux-2.4.21/include/linux/ext3_fs.h
+@@ -81,7 +81,7 @@
  /*
   * Maximal count of links to a file
   */
@@ -154,3 +154,19 @@ Index: 69chaos/include/linux/ext3_fs.h
  
  /*
   * Macro-instructions used to manage several block sizes
+@@ -505,6 +505,7 @@ static inline struct inode *orphan_list_
+ #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
+@@ -518,6 +519,7 @@ static inline struct inode *orphan_list_
+                                        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)
+ /*