Commit eb8c6834 authored by Robin Holt's avatar Robin Holt Committed by Linus Torvalds

[PATCH] Hold BKL for shorter period in generic_shutdown_super().

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: default avatarRobin Holt <holt@sgi.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent fe395411
...@@ -232,10 +232,10 @@ void generic_shutdown_super(struct super_block *sb) ...@@ -232,10 +232,10 @@ void generic_shutdown_super(struct super_block *sb)
dput(root); dput(root);
fsync_super(sb); fsync_super(sb);
lock_super(sb); lock_super(sb);
lock_kernel();
sb->s_flags &= ~MS_ACTIVE; sb->s_flags &= ~MS_ACTIVE;
/* bad name - it should be evict_inodes() */ /* bad name - it should be evict_inodes() */
invalidate_inodes(sb); invalidate_inodes(sb);
lock_kernel();
if (sop->write_super && sb->s_dirt) if (sop->write_super && sb->s_dirt)
sop->write_super(sb); sop->write_super(sb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment