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
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to