Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Oct 2014 17:53:49 +0000 (UTC)
From:      Mateusz Guzik <mjg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r273335 - head/sys/fs/unionfs
Message-ID:  <201410201753.s9KHrnaG009500@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mjg
Date: Mon Oct 20 17:53:49 2014
New Revision: 273335
URL: https://svnweb.freebsd.org/changeset/base/273335

Log:
  unionfs: hold mount interlock while manipulating mnt_flag
  
  This is for consistency with other filesystems.

Modified:
  head/sys/fs/unionfs/union_vfsops.c

Modified: head/sys/fs/unionfs/union_vfsops.c
==============================================================================
--- head/sys/fs/unionfs/union_vfsops.c	Mon Oct 20 17:04:03 2014	(r273334)
+++ head/sys/fs/unionfs/union_vfsops.c	Mon Oct 20 17:53:49 2014	(r273335)
@@ -290,12 +290,14 @@ unionfs_domount(struct mount *mp)
 		return (error);
 	}
 
+	MNT_ILOCK(mp);
 	/*
 	 * Check mnt_flag
 	 */
 	if ((ump->um_lowervp->v_mount->mnt_flag & MNT_LOCAL) &&
 	    (ump->um_uppervp->v_mount->mnt_flag & MNT_LOCAL))
 		mp->mnt_flag |= MNT_LOCAL;
+	MNT_IUNLOCK(mp);
 
 	/*
 	 * Get new fsid



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410201753.s9KHrnaG009500>