1 Index: linux-2.4.29/fs/inode.c
2 ===================================================================
3 --- linux-2.4.29.orig/fs/inode.c 2005-04-07 18:55:16.732416736 +0300
4 +++ linux-2.4.29/fs/inode.c 2005-04-07 19:16:46.772300864 +0300
7 * Invalidate all inodes for a device.
9 -static int invalidate_list(struct list_head *head, struct super_block * sb, struct list_head * dispose)
10 +static int invalidate_list(struct list_head *head, struct super_block * sb,
11 + struct list_head * dispose, int show)
13 struct list_head *next;
14 int busy = 0, count = 0;
21 + "inode busy: dev %s:%lu (%p) mode %o count %u\n",
22 + kdevname(sb->s_dev), inode->i_ino, inode,
23 + inode->i_mode, atomic_read(&inode->i_count));
26 /* only unused inodes may be cached with i_count zero */
28 * If the discard is successful all the inodes have been discarded.
31 -int invalidate_inodes(struct super_block * sb)
32 +int invalidate_inodes(struct super_block * sb, int show)
35 LIST_HEAD(throw_away);
37 spin_lock(&inode_lock);
38 - busy = invalidate_list(&inode_in_use, sb, &throw_away);
39 - busy |= invalidate_list(&inode_unused, sb, &throw_away);
40 - busy |= invalidate_list(&inode_unused_pagecache, sb, &throw_away);
41 - busy |= invalidate_list(&sb->s_dirty, sb, &throw_away);
42 - busy |= invalidate_list(&sb->s_locked_inodes, sb, &throw_away);
43 + busy = invalidate_list(&inode_in_use, sb, &throw_away, show);
44 + busy |= invalidate_list(&inode_unused, sb, &throw_away, show);
45 + busy |= invalidate_list(&inode_unused_pagecache, sb, &throw_away, show);
46 + busy |= invalidate_list(&sb->s_dirty, sb, &throw_away, show);
47 + busy |= invalidate_list(&sb->s_locked_inodes, sb, &throw_away, show);
48 spin_unlock(&inode_lock);
50 dispose_list(&throw_away);
55 - res = invalidate_inodes(sb);
56 + res = invalidate_inodes(sb, 0);
59 invalidate_buffers(dev);
60 Index: linux-2.4.29/fs/super.c
61 ===================================================================
62 --- linux-2.4.29.orig/fs/super.c 2005-04-07 18:53:30.978493776 +0300
63 +++ linux-2.4.29/fs/super.c 2005-04-07 19:14:26.187672976 +0300
67 sb->s_flags &= ~MS_ACTIVE;
68 - invalidate_inodes(sb); /* bad name - it should be evict_inodes() */
69 + invalidate_inodes(sb, 0); /* bad name - it should be evict_inodes() */
71 if (sop->write_super && sb->s_dirt)
76 /* Forget any remaining inodes */
77 - if (invalidate_inodes(sb)) {
78 + if (invalidate_inodes(sb, 1)) {
79 printk(KERN_ERR "VFS: Busy inodes after unmount. "
80 "Self-destruct in 5 seconds. Have a nice day...\n");
82 Index: linux-2.4.29/include/linux/fs.h
83 ===================================================================
84 --- linux-2.4.29.orig/include/linux/fs.h 2005-04-07 19:14:06.319693368 +0300
85 +++ linux-2.4.29/include/linux/fs.h 2005-04-07 19:14:26.190672520 +0300
87 extern int get_buffer_flushtime(void);
88 extern void balance_dirty(void);
89 extern int check_disk_change(kdev_t);
90 -extern int invalidate_inodes(struct super_block *);
91 +extern int invalidate_inodes(struct super_block *, int);
92 extern int invalidate_device(kdev_t, int);
93 extern void invalidate_inode_pages(struct inode *);
94 extern void invalidate_inode_pages2(struct address_space *);
95 Index: linux-2.4.29/fs/smbfs/inode.c
96 ===================================================================
97 --- linux-2.4.29.orig/fs/smbfs/inode.c 2005-04-07 18:52:37.889564520 +0300
98 +++ linux-2.4.29/fs/smbfs/inode.c 2005-04-07 19:14:26.192672216 +0300
102 shrink_dcache_sb(SB_of(server));
103 - invalidate_inodes(SB_of(server));
104 + invalidate_inodes(SB_of(server), 0);