svn commit: r357136 - head/sys/kern

Mateusz Guzik mjg at FreeBSD.org
Sun Jan 26 07:06:19 UTC 2020


Author: mjg
Date: Sun Jan 26 07:06:18 2020
New Revision: 357136
URL: https://svnweb.freebsd.org/changeset/base/357136

Log:
  vfs: do an unlocked check before iterating the lazy list
  
  For most filesystems it is expected to be empty most of the time.

Modified:
  head/sys/kern/vfs_subr.c

Modified: head/sys/kern/vfs_subr.c
==============================================================================
--- head/sys/kern/vfs_subr.c	Sun Jan 26 07:05:06 2020	(r357135)
+++ head/sys/kern/vfs_subr.c	Sun Jan 26 07:06:18 2020	(r357136)
@@ -6368,6 +6368,9 @@ __mnt_vnode_first_lazy(struct vnode **mvp, struct moun
 {
 	struct vnode *vp;
 
+	if (TAILQ_EMPTY(&mp->mnt_lazyvnodelist))
+		return (NULL);
+
 	*mvp = vn_alloc_marker(mp);
 	MNT_ILOCK(mp);
 	MNT_REF(mp);


More information about the svn-src-head mailing list