Index: linux-2.4.24-vanilla/fs/ext3/super.c
===================================================================
--- linux-2.4.24-vanilla.orig/fs/ext3/super.c 2004-01-10 17:49:10.000000000 +0300
-+++ linux-2.4.24-vanilla/fs/ext3/super.c 2004-01-11 22:30:24.000000000 +0300
-@@ -400,6 +400,126 @@
++++ linux-2.4.24-vanilla/fs/ext3/super.c 2004-01-11 23:13:34.000000000 +0300
+@@ -400,6 +400,127 @@
}
}
+ ext3_debug("%s delete ino %lu blk %lu\n",
+ tsk->comm, inode->i_ino, blocks);
+
++ J_ASSERT(EXT3_I(inode)->i_state & EXT3_STATE_DELETE);
+ J_ASSERT(inode->i_nlink == 1);
+ inode->i_nlink = 0;
+ iput(inode);
void ext3_put_super (struct super_block * sb)
{
struct ext3_sb_info *sbi = EXT3_SB(sb);
-@@ -527,6 +647,13 @@
+@@ -527,6 +648,13 @@
clear_opt (*mount_options, XATTR_USER);
else
#endif
if (!strcmp (this_char, "bsddf"))
clear_opt (*mount_options, MINIX_DF);
else if (!strcmp (this_char, "nouid32")) {
-@@ -1227,6 +1354,7 @@
+@@ -1227,6 +1355,7 @@
}
ext3_setup_super (sb, es, sb->s_flags & MS_RDONLY);
/*
* akpm: core read_super() calls in here with the superblock locked.
* That deadlocks, because orphan cleanup needs to lock the superblock
-@@ -1618,7 +1746,12 @@
+@@ -1618,7 +1747,12 @@
static int ext3_sync_fs(struct super_block *sb)
{
tid_t target;
sb->s_dirt = 0;
target = log_start_commit(EXT3_SB(sb)->s_journal, NULL);
log_wait_commit(EXT3_SB(sb)->s_journal, target);
-@@ -1682,6 +1815,9 @@
+@@ -1682,6 +1816,9 @@
if (!parse_options(data, &tmp, sbi, &tmp, 1))
return -EINVAL;
Index: linux-2.4.24-vanilla/fs/ext3/inode.c
===================================================================
--- linux-2.4.24-vanilla.orig/fs/ext3/inode.c 2004-01-10 17:49:11.000000000 +0300
-+++ linux-2.4.24-vanilla/fs/ext3/inode.c 2004-01-11 22:26:24.000000000 +0300
++++ linux-2.4.24-vanilla/fs/ext3/inode.c 2004-01-11 23:12:44.000000000 +0300
@@ -2551,6 +2551,118 @@
return err;
}
+ new_inode->i_blocks = old_inode->i_blocks;
+ new_inode->i_uid = old_inode->i_uid;
+ new_inode->i_gid = old_inode->i_gid;
-+ new_inode->i_nlink = 0;
++ new_inode->i_nlink = 1;
+
+ /* FIXME when we do arbitrary truncates */
+ old_inode->i_blocks = oei->i_file_acl ? old_inode->i_blksize / 512 : 0;
Index: linux-2.4.24-vanilla/fs/ext3/file.c
===================================================================
--- linux-2.4.24-vanilla.orig/fs/ext3/file.c 2004-01-10 17:49:10.000000000 +0300
-+++ linux-2.4.24-vanilla/fs/ext3/file.c 2004-01-11 22:26:24.000000000 +0300
++++ linux-2.4.24-vanilla/fs/ext3/file.c 2004-01-11 23:08:54.000000000 +0300
@@ -126,7 +126,11 @@
};
Index: linux-2.4.24-vanilla/fs/ext3/namei.c
===================================================================
--- linux-2.4.24-vanilla.orig/fs/ext3/namei.c 2004-01-10 17:49:10.000000000 +0300
-+++ linux-2.4.24-vanilla/fs/ext3/namei.c 2004-01-11 22:26:24.000000000 +0300
++++ linux-2.4.24-vanilla/fs/ext3/namei.c 2004-01-11 23:08:54.000000000 +0300
@@ -1936,6 +1936,36 @@
return retval;
}
Index: linux-2.4.24-vanilla/include/linux/ext3_fs.h
===================================================================
--- linux-2.4.24-vanilla.orig/include/linux/ext3_fs.h 2004-01-10 17:49:11.000000000 +0300
-+++ linux-2.4.24-vanilla/include/linux/ext3_fs.h 2004-01-11 22:26:24.000000000 +0300
++++ linux-2.4.24-vanilla/include/linux/ext3_fs.h 2004-01-11 23:08:54.000000000 +0300
@@ -193,6 +193,7 @@
*/
#define EXT3_STATE_JDATA 0x00000001 /* journaled data exists */
Index: linux-2.4.24-vanilla/include/linux/ext3_fs_sb.h
===================================================================
--- linux-2.4.24-vanilla.orig/include/linux/ext3_fs_sb.h 2004-01-10 17:49:10.000000000 +0300
-+++ linux-2.4.24-vanilla/include/linux/ext3_fs_sb.h 2004-01-11 22:28:44.000000000 +0300
++++ linux-2.4.24-vanilla/include/linux/ext3_fs_sb.h 2004-01-11 23:08:54.000000000 +0300
@@ -29,6 +29,8 @@
#define EXT3_MAX_GROUP_LOADED 8