1 --- lum/fs/inode.c Sat Oct 19 11:42:42 2002
2 +++ linux-2.4.18-uml35-ext3online/fs/inode.c Mon Oct 14 00:41:20 2002
3 @@ -606,7 +553,8 @@ static void dispose_list(struct list_hea
5 * Invalidate all inodes for a device.
7 -static int invalidate_list(struct list_head *head, struct super_block * sb, struct list_head * dispose)
8 +static int invalidate_list(struct list_head *head, struct super_block * sb,
9 + struct list_head * dispose, int show)
11 struct list_head *next;
12 int busy = 0, count = 0;
13 @@ -631,6 +579,11 @@ static int invalidate_list(struct list_h
19 + "inode busy: dev %s:%lu (%p) mode %o count %u\n",
20 + kdevname(sb->s_dev), inode->i_ino, inode,
21 + inode->i_mode, atomic_read(&inode->i_count));
24 /* only unused inodes may be cached with i_count zero */
25 @@ -649,22 +601,23 @@ static int invalidate_list(struct list_h
27 * invalidate_inodes - discard the inodes on a device
29 + * @show: whether we should display any busy inodes found
31 * Discard all of the inodes for a given superblock. If the discard
32 * fails because there are busy inodes then a non zero value is returned.
33 * If the discard is successful all the inodes have been discarded.
36 -int invalidate_inodes(struct super_block * sb)
37 +int invalidate_inodes(struct super_block * sb, int show)
40 LIST_HEAD(throw_away);
42 spin_lock(&inode_lock);
43 - busy = invalidate_list(&inode_in_use, sb, &throw_away);
44 - busy |= invalidate_list(&inode_unused, sb, &throw_away);
45 - busy |= invalidate_list(&sb->s_dirty, sb, &throw_away);
46 - busy |= invalidate_list(&sb->s_locked_inodes, sb, &throw_away);
47 + busy = invalidate_list(&inode_in_use, sb, &throw_away, show);
48 + busy |= invalidate_list(&inode_unused, sb, &throw_away, show);
49 + busy |= invalidate_list(&sb->s_dirty, sb, &throw_away, show);
50 + busy |= invalidate_list(&sb->s_locked_inodes, sb, &throw_away, show);
51 spin_unlock(&inode_lock);
53 dispose_list(&throw_away);
54 @@ -690,7 +643,7 @@ int invalidate_device(kdev_t dev, int do
58 - res = invalidate_inodes(sb);
59 + res = invalidate_inodes(sb, 0);
62 invalidate_buffers(dev);
63 --- lum/fs/super.c.orig Sat Oct 19 11:42:42 2002
64 +++ lum/fs/super.c Wed Oct 30 17:16:55 2002
68 sb->s_flags &= ~MS_ACTIVE;
69 - invalidate_inodes(sb); /* bad name - it should be evict_inodes() */
70 + invalidate_inodes(sb, 0); /* bad name - it should be evict_inodes() */
72 if (sop->write_super && sb->s_dirt)
77 /* Forget any remaining inodes */
78 - if (invalidate_inodes(sb)) {
79 + if (invalidate_inodes(sb, 1)) {
80 printk(KERN_ERR "VFS: Busy inodes after unmount. "
81 "Self-destruct in 5 seconds. Have a nice day...\n");
83 --- lum/include/linux/fs.h Wed Oct 30 17:10:42 2002
84 +++ lum/include/linux/fs.h.orig Tue Oct 22 23:15:00 2002
86 extern void set_buffer_flushtime(struct buffer_head *);
87 extern void balance_dirty(void);
88 extern int check_disk_change(kdev_t);
89 -extern int invalidate_inodes(struct super_block *);
90 +extern int invalidate_inodes(struct super_block *, int);
91 extern int invalidate_device(kdev_t, int);
92 extern void invalidate_inode_pages(struct inode *);
93 extern void invalidate_inode_pages2(struct address_space *);
94 --- lum/fs/smbfs/inode.c.orig Mon Feb 25 12:38:09 2002
95 +++ lum/fs/smbfs/inode.c Thu Feb 6 21:34:26 2003
99 shrink_dcache_sb(SB_of(server));
100 - invalidate_inodes(SB_of(server));
101 + invalidate_inodes(SB_of(server), 0);