From 423e0ab086ad8b33626e45fa94ac7613146b7ffa Mon Sep 17 00:00:00 2001 From: Tim Chen Date: Tue, 19 Jul 2011 09:32:38 -0700 Subject: VFS : mount lock scalability for internal mounts For a number of file systems that don't have a mount point (e.g. sockfs and pipefs), they are not marked as long term. Therefore in mntput_no_expire, all locks in vfs_mount lock are taken instead of just local cpu's lock to aggregate reference counts when we release reference to file objects. In fact, only local lock need to have been taken to update ref counts as these file systems are in no danger of going away until we are ready to unregister them. The attached patch marks file systems using kern_mount without mount point as long term. The contentions of vfs_mount lock is now eliminated. Before un-registering such file system, kern_unmount should be called to remove the long term flag and make the mount point ready to be freed. Signed-off-by: Tim Chen Signed-off-by: Al Viro --- fs/anon_inodes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/anon_inodes.c') diff --git a/fs/anon_inodes.c b/fs/anon_inodes.c index c5567cb78432..4d433d34736f 100644 --- a/fs/anon_inodes.c +++ b/fs/anon_inodes.c @@ -233,7 +233,7 @@ static int __init anon_inode_init(void) return 0; err_mntput: - mntput(anon_inode_mnt); + kern_unmount(anon_inode_mnt); err_unregister_filesystem: unregister_filesystem(&anon_inode_fs_type); err_exit: -- cgit v1.2.2