From: Robin Holt Testing revealed long pauses of the entire system while autofs initiated umounts as a result of timing out the mounts. It was noticed that during a umount, the BKL is held while scanning the inode_list and removing and inodes that are candidates. This patch moves locking until after the first pass had gone through the inode_list. Testing revelead that on an ia64 machine with a filesystem that had 8.4 Million inodes, there were no observable pauses during the umount. This was down from over 4 seconds without this patch. Signed-Off-By: Robin Holt Signed-off-by: Andrew Morton --- 25-akpm/fs/super.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN fs/super.c~hold-bkl-for-shorter-period-in-generic_shutdown_super fs/super.c --- 25/fs/super.c~hold-bkl-for-shorter-period-in-generic_shutdown_super 2004-11-16 23:47:52.523198320 -0800 +++ 25-akpm/fs/super.c 2004-11-16 23:47:52.526197864 -0800 @@ -232,10 +232,10 @@ void generic_shutdown_super(struct super dput(root); fsync_super(sb); lock_super(sb); - lock_kernel(); sb->s_flags &= ~MS_ACTIVE; /* bad name - it should be evict_inodes() */ invalidate_inodes(sb); + lock_kernel(); if (sop->write_super && sb->s_dirt) sop->write_super(sb); _