1 Index: linux-2.6.9-full/fs/ext3/super.c
2 ===================================================================
3 --- linux-2.6.9-full.orig/fs/ext3/super.c 2006-06-02 23:37:51.000000000 +0400
4 +++ linux-2.6.9-full/fs/ext3/super.c 2006-06-02 23:56:29.000000000 +0400
5 @@ -43,7 +43,7 @@ static int ext3_load_journal(struct supe
6 unsigned long journal_devnum);
7 static int ext3_create_journal(struct super_block *, struct ext3_super_block *,
9 -static void ext3_commit_super (struct super_block * sb,
10 +void ext3_commit_super (struct super_block * sb,
11 struct ext3_super_block * es,
13 static void ext3_mark_recovery_complete(struct super_block * sb,
14 @@ -1991,7 +1991,7 @@ static int ext3_create_journal(struct su
18 -static void ext3_commit_super (struct super_block * sb,
19 +void ext3_commit_super (struct super_block * sb,
20 struct ext3_super_block * es,
23 Index: linux-2.6.9-full/fs/ext3/namei.c
24 ===================================================================
25 --- linux-2.6.9-full.orig/fs/ext3/namei.c 2006-06-02 23:37:49.000000000 +0400
26 +++ linux-2.6.9-full/fs/ext3/namei.c 2006-06-02 23:43:31.000000000 +0400
27 @@ -1599,7 +1599,7 @@ static int ext3_delete_entry (handle_t *
28 struct buffer_head * bh)
30 struct ext3_dir_entry_2 * de, * pde;
36 @@ -1609,7 +1609,9 @@ static int ext3_delete_entry (handle_t *
39 BUFFER_TRACE(bh, "get_write_access");
40 - ext3_journal_get_write_access(handle, bh);
41 + err = ext3_journal_get_write_access(handle, bh);
46 cpu_to_le16(le16_to_cpu(pde->rec_len) +
47 Index: linux-2.6.9-full/fs/ext3/xattr.c
48 ===================================================================
49 --- linux-2.6.9-full.orig/fs/ext3/xattr.c 2006-06-01 14:58:48.000000000 +0400
50 +++ linux-2.6.9-full/fs/ext3/xattr.c 2006-06-03 00:02:00.000000000 +0400
51 @@ -132,7 +132,7 @@ ext3_xattr_handler(int name_index)
53 struct xattr_handler *handler = NULL;
55 - if (name_index > 0 && name_index <= EXT3_XATTR_INDEX_MAX)
56 + if (name_index > 0 && name_index < EXT3_XATTR_INDEX_MAX)
57 handler = ext3_xattr_handler_map[name_index];
60 Index: linux-2.6.9-full/fs/ext3/inode.c
61 ===================================================================
62 --- linux-2.6.9-full.orig/fs/ext3/inode.c 2006-06-02 23:37:38.000000000 +0400
63 +++ linux-2.6.9-full/fs/ext3/inode.c 2006-06-03 00:27:41.000000000 +0400
64 @@ -1513,9 +1513,14 @@ out_stop:
65 if (end > inode->i_size) {
67 i_size_write(inode, end);
68 - err = ext3_mark_inode_dirty(handle, inode);
72 + * We're going to return a positive `ret'
73 + * here due to non-zero-length I/O, so there's
74 + * no way of reporting error returns from
75 + * ext3_mark_inode_dirty() to userspace. So
78 + ext3_mark_inode_dirty(handle, inode);
81 err = ext3_journal_stop(handle);
82 @@ -1807,8 +1812,18 @@ ext3_clear_blocks(handle_t *handle, stru
83 ext3_mark_inode_dirty(handle, inode);
84 ext3_journal_test_restart(handle, inode);
87 BUFFER_TRACE(bh, "retaking write access");
88 - ext3_journal_get_write_access(handle, bh);
89 + err = ext3_journal_get_write_access(handle, bh);
91 + struct super_block *sb = inode->i_sb;
92 + struct ext3_super_block *es = EXT3_SB(sb)->s_es;
93 + printk (KERN_CRIT"EXT3-fs: can't continue truncate\n");
94 + EXT3_SB(sb)->s_mount_state |= EXT3_ERROR_FS;
95 + es->s_state |= cpu_to_le16(EXT3_ERROR_FS);
96 + ext3_commit_super(sb, es, 1);