unionfs: hold mount interlock while manipulating mnt_flag

This is for consistency with other filesystems.
This commit is contained in:
Mateusz Guzik 2014-10-20 17:53:49 +00:00
parent 0067051fe7
commit a8a07fd613
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=273335

View File

@ -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