1 Index: linux-2.6.5-7.201-full/include/linux/ext3_fs.h
2 ===================================================================
3 --- linux-2.6.5-7.201-full.orig/include/linux/ext3_fs.h 2006-08-09 17:59:34.000000000 +0400
4 +++ linux-2.6.5-7.201-full/include/linux/ext3_fs.h 2006-08-22 12:35:55.000000000 +0400
5 @@ -793,6 +793,7 @@ extern void ext3_put_super (struct super
6 extern void ext3_write_super (struct super_block *);
7 extern void ext3_write_super_lockfs (struct super_block *);
8 extern void ext3_unlockfs (struct super_block *);
9 +extern void ext3_commit_super (struct super_block *, struct ext3_super_block *, int);
10 extern int ext3_remount (struct super_block *, int *, char *);
11 extern int ext3_statfs (struct super_block *, struct kstatfs *);
13 Index: linux-2.6.5-7.201-full/fs/ext3/super.c
14 ===================================================================
15 --- linux-2.6.5-7.201-full.orig/fs/ext3/super.c 2006-08-09 17:59:37.000000000 +0400
16 +++ linux-2.6.5-7.201-full/fs/ext3/super.c 2006-08-09 17:59:37.000000000 +0400
18 static int ext3_load_journal(struct super_block *, struct ext3_super_block *);
19 static int ext3_create_journal(struct super_block *, struct ext3_super_block *,
21 -static void ext3_commit_super (struct super_block * sb,
22 +void ext3_commit_super (struct super_block * sb,
23 struct ext3_super_block * es,
25 static void ext3_mark_recovery_complete(struct super_block * sb,
26 @@ -1781,7 +1781,7 @@ static int ext3_create_journal(struct su
30 -static void ext3_commit_super (struct super_block * sb,
31 +void ext3_commit_super (struct super_block * sb,
32 struct ext3_super_block * es,
35 Index: linux-2.6.5-7.201-full/fs/ext3/namei.c
36 ===================================================================
37 --- linux-2.6.5-7.201-full.orig/fs/ext3/namei.c 2006-08-09 17:59:37.000000000 +0400
38 +++ linux-2.6.5-7.201-full/fs/ext3/namei.c 2006-08-09 17:59:37.000000000 +0400
39 @@ -1598,7 +1598,7 @@ static int ext3_delete_entry (handle_t *
40 struct buffer_head * bh)
42 struct ext3_dir_entry_2 * de, * pde;
48 @@ -1608,7 +1608,9 @@ static int ext3_delete_entry (handle_t *
51 BUFFER_TRACE(bh, "get_write_access");
52 - ext3_journal_get_write_access(handle, bh);
53 + err = ext3_journal_get_write_access(handle, bh);
58 cpu_to_le16(le16_to_cpu(pde->rec_len) +
59 Index: linux-2.6.5-7.201-full/fs/ext3/xattr.c
60 ===================================================================
61 --- linux-2.6.5-7.201-full.orig/fs/ext3/xattr.c 2006-07-14 01:53:23.000000000 +0400
62 +++ linux-2.6.5-7.201-full/fs/ext3/xattr.c 2006-08-09 17:59:37.000000000 +0400
63 @@ -107,7 +107,7 @@ ext3_xattr_register(int name_index, stru
67 - if (name_index > 0 && name_index <= EXT3_XATTR_INDEX_MAX) {
68 + if (name_index > 0 && name_index < EXT3_XATTR_INDEX_MAX) {
69 write_lock(&ext3_handler_lock);
70 if (!ext3_xattr_handlers[name_index-1]) {
71 ext3_xattr_handlers[name_index-1] = handler;
72 Index: linux-2.6.5-7.201-full/fs/ext3/inode.c
73 ===================================================================
74 --- linux-2.6.5-7.201-full.orig/fs/ext3/inode.c 2006-07-14 01:53:22.000000000 +0400
75 +++ linux-2.6.5-7.201-full/fs/ext3/inode.c 2006-08-22 12:35:28.000000000 +0400
76 @@ -1517,9 +1517,14 @@ out_stop:
77 if (end > inode->i_size) {
79 i_size_write(inode, end);
80 - err = ext3_mark_inode_dirty(handle, inode);
84 + * We're going to return a positive `ret'
85 + * here due to non-zero-length I/O, so there's
86 + * no way of reporting error returns from
87 + * ext3_mark_inode_dirty() to userspace. So
90 + ext3_mark_inode_dirty(handle, inode);
93 err = ext3_journal_stop(handle);
94 @@ -1811,8 +1816,18 @@ ext3_clear_blocks(handle_t *handle, stru
95 ext3_mark_inode_dirty(handle, inode);
96 ext3_journal_test_restart(handle, inode);
99 BUFFER_TRACE(bh, "retaking write access");
100 - ext3_journal_get_write_access(handle, bh);
101 + err = ext3_journal_get_write_access(handle, bh);
103 + struct super_block *sb = inode->i_sb;
104 + struct ext3_super_block *es = EXT3_SB(sb)->s_es;
105 + printk (KERN_CRIT"EXT3-fs: can't continue truncate\n");
106 + EXT3_SB(sb)->s_mount_state |= EXT3_ERROR_FS;
107 + es->s_state |= cpu_to_le16(EXT3_ERROR_FS);
108 + ext3_commit_super(sb, es, 1);