1 diff -urN S15/fs/inode.c S15-fix/fs/inode.c
2 --- S15/fs/inode.c Fri Nov 23 06:45:43 2001
3 +++ S15-fix/fs/inode.c Fri Nov 23 16:33:33 2001
4 @@ -1065,24 +1065,27 @@
5 if (inode->i_state != I_CLEAR)
8 - if (!list_empty(&inode->i_hash) && sb && sb->s_root) {
9 + if (!list_empty(&inode->i_hash) {
10 if (!(inode->i_state & (I_DIRTY|I_LOCK))) {
11 list_del(&inode->i_list);
12 list_add(&inode->i_list, &inode_unused);
14 inodes_stat.nr_unused++;
15 spin_unlock(&inode_lock);
18 - list_del_init(&inode->i_list);
19 + if (!sb || sb->s_flags & MS_ACTIVE))
21 + write_inode_now(inode);
22 + spin_lock(&inode_lock);
23 + inodes_stat.nr_unused--;
24 list_del_init(&inode->i_hash);
25 - inode->i_state|=I_FREEING;
26 - inodes_stat.nr_inodes--;
27 - spin_unlock(&inode_lock);
28 - if (inode->i_data.nrpages)
29 - truncate_inode_pages(&inode->i_data, 0);
32 + list_del_init(&inode->i_list);
33 + inode->i_state|=I_FREEING;
34 + inodes_stat.nr_inodes--;
35 + spin_unlock(&inode_lock);
36 + if (inode->i_data.nrpages)
37 + truncate_inode_pages(&inode->i_data, 0);
42 diff -urN S15/fs/super.c S15-fix/fs/super.c
43 --- S15/fs/super.c Fri Nov 23 06:45:43 2001
44 +++ S15-fix/fs/super.c Fri Nov 23 16:26:18 2001
47 if (!type->read_super(s, data, flags & MS_VERBOSE ? 1 : 0))
49 + s->s_flags |= MS_ACTIVE;
51 /* tell bdcache that we are going to keep this one */
55 if (!fs_type->read_super(s, data, flags & MS_VERBOSE ? 1 : 0))
57 + s->s_flags |= MS_ACTIVE;
59 get_filesystem(fs_type);
63 if (!fs_type->read_super(s, data, flags & MS_VERBOSE ? 1 : 0))
65 + s->s_flags |= MS_ACTIVE;
67 get_filesystem(fs_type);
73 + sb->s_flags &= ~MS_ACTIVE;
74 invalidate_inodes(sb); /* bad name - it should be evict_inodes() */
76 if (sop->write_super && sb->s_dirt)
77 diff -urN S15/include/linux/fs.h S15-fix/include/linux/fs.h
78 --- S15/include/linux/fs.h Fri Nov 23 06:45:44 2001
79 +++ S15-fix/include/linux/fs.h Fri Nov 23 16:24:44 2001
83 #define MS_VERBOSE 32768
84 +#define MS_ACTIVE (1<<30)
85 #define MS_NOUSER (1<<31)