svn commit: r288103 - stable/10/sys/kern

Konstantin Belousov kib at FreeBSD.org
Tue Sep 22 10:31:49 UTC 2015


Author: kib
Date: Tue Sep 22 10:31:48 2015
New Revision: 288103
URL: https://svnweb.freebsd.org/changeset/base/288103

Log:
  The stable/10 branch uses mutex for vfs_hash.  Fix build.
  
  Submitted by:	Jukka Ukkonen <jau789 at gmail.com>

Modified:
  stable/10/sys/kern/vfs_hash.c

Modified: stable/10/sys/kern/vfs_hash.c
==============================================================================
--- stable/10/sys/kern/vfs_hash.c	Tue Sep 22 10:00:32 2015	(r288102)
+++ stable/10/sys/kern/vfs_hash.c	Tue Sep 22 10:31:48 2015	(r288103)
@@ -181,7 +181,7 @@ vfs_hash_changesize(int newmaxvnodes)
 	 * None of the vnodes in the table can be recycled because to
 	 * do so, they have to be removed from the hash table.
 	 */
-	rw_wlock(&vfs_hash_lock);
+	mtx_lock(&vfs_hash_mtx);
 	vfs_hash_oldtbl = vfs_hash_tbl;
 	vfs_hash_oldmask = vfs_hash_mask;
 	vfs_hash_tbl = vfs_hash_newtbl;
@@ -194,6 +194,6 @@ vfs_hash_changesize(int newmaxvnodes)
 			    vp, v_hashlist);
 		}
 	}
-	rw_wunlock(&vfs_hash_lock);
+	mtx_unlock(&vfs_hash_mtx);
 	free(vfs_hash_oldtbl, M_VFS_HASH);
 }


More information about the svn-src-all mailing list