Index: linux-2.4.29/fs/inode.c =================================================================== --- linux-2.4.29.orig/fs/inode.c 2005-04-07 18:55:16.732416736 +0300 +++ linux-2.4.29/fs/inode.c 2005-04-07 19:16:46.772300864 +0300 @@ -670,7 +670,8 @@ /* * Invalidate all inodes for a device. */ -static int invalidate_list(struct list_head *head, struct super_block * sb, struct list_head * dispose) +static int invalidate_list(struct list_head *head, struct super_block * sb, + struct list_head * dispose, int show) { struct list_head *next; int busy = 0, count = 0; @@ -695,6 +696,11 @@ count++; continue; } + if (show) + printk(KERN_ERR + "inode busy: dev %s:%lu (%p) mode %o count %u\n", + kdevname(sb->s_dev), inode->i_ino, inode, + inode->i_mode, atomic_read(&inode->i_count)); busy = 1; } /* only unused inodes may be cached with i_count zero */ @@ -719,17 +725,17 @@ * If the discard is successful all the inodes have been discarded. */ -int invalidate_inodes(struct super_block * sb) +int invalidate_inodes(struct super_block * sb, int show) { int busy; LIST_HEAD(throw_away); spin_lock(&inode_lock); - busy = invalidate_list(&inode_in_use, sb, &throw_away); - busy |= invalidate_list(&inode_unused, sb, &throw_away); - busy |= invalidate_list(&inode_unused_pagecache, sb, &throw_away); - busy |= invalidate_list(&sb->s_dirty, sb, &throw_away); - busy |= invalidate_list(&sb->s_locked_inodes, sb, &throw_away); + busy = invalidate_list(&inode_in_use, sb, &throw_away, show); + busy |= invalidate_list(&inode_unused, sb, &throw_away, show); + busy |= invalidate_list(&inode_unused_pagecache, sb, &throw_away, show); + busy |= invalidate_list(&sb->s_dirty, sb, &throw_away, show); + busy |= invalidate_list(&sb->s_locked_inodes, sb, &throw_away, show); spin_unlock(&inode_lock); dispose_list(&throw_away); @@ -755,7 +761,7 @@ * hold). */ shrink_dcache_sb(sb); - res = invalidate_inodes(sb); + res = invalidate_inodes(sb, 0); drop_super(sb); } invalidate_buffers(dev); Index: linux-2.4.29/fs/super.c =================================================================== --- linux-2.4.29.orig/fs/super.c 2005-04-07 18:53:30.978493776 +0300 +++ linux-2.4.29/fs/super.c 2005-04-07 19:14:26.187672976 +0300 @@ -844,7 +844,7 @@ lock_super(sb); lock_kernel(); sb->s_flags &= ~MS_ACTIVE; - invalidate_inodes(sb); /* bad name - it should be evict_inodes() */ + invalidate_inodes(sb, 0); /* bad name - it should be evict_inodes() */ if (sop) { if (sop->write_super && sb->s_dirt) sop->write_super(sb); @@ -853,7 +853,7 @@ } /* Forget any remaining inodes */ - if (invalidate_inodes(sb)) { + if (invalidate_inodes(sb, 1)) { printk(KERN_ERR "VFS: Busy inodes after unmount. " "Self-destruct in 5 seconds. Have a nice day...\n"); } Index: linux-2.4.29/include/linux/fs.h =================================================================== --- linux-2.4.29.orig/include/linux/fs.h 2005-04-07 19:14:06.319693368 +0300 +++ linux-2.4.29/include/linux/fs.h 2005-04-07 19:14:26.190672520 +0300 @@ -1286,7 +1286,7 @@ extern int get_buffer_flushtime(void); extern void balance_dirty(void); extern int check_disk_change(kdev_t); -extern int invalidate_inodes(struct super_block *); +extern int invalidate_inodes(struct super_block *, int); extern int invalidate_device(kdev_t, int); extern void invalidate_inode_pages(struct inode *); extern void invalidate_inode_pages2(struct address_space *); Index: linux-2.4.29/fs/smbfs/inode.c =================================================================== --- linux-2.4.29.orig/fs/smbfs/inode.c 2005-04-07 18:52:37.889564520 +0300 +++ linux-2.4.29/fs/smbfs/inode.c 2005-04-07 19:14:26.192672216 +0300 @@ -175,7 +175,7 @@ { VERBOSE("\n"); shrink_dcache_sb(SB_of(server)); - invalidate_inodes(SB_of(server)); + invalidate_inodes(SB_of(server), 0); } /*