diff options
author | Mateusz Guzik <mjg@FreeBSD.org> | 2014-10-20 17:53:49 +0000 |
---|---|---|
committer | Mateusz Guzik <mjg@FreeBSD.org> | 2014-10-20 17:53:49 +0000 |
commit | a8a07fd6137b0e0538e360abaae1eeeb541d0833 (patch) | |
tree | 82f2d1213d65565b2c15f6abd81c3eec11a80691 /sys/fs/unionfs/union_vfsops.c | |
parent | 0067051fe7ec2efffec5f50f52bbc5699f955d64 (diff) | |
download | src-a8a07fd6137b0e0538e360abaae1eeeb541d0833.tar.gz src-a8a07fd6137b0e0538e360abaae1eeeb541d0833.zip |
unionfs: hold mount interlock while manipulating mnt_flag
This is for consistency with other filesystems.
Notes
Notes:
svn path=/head/; revision=273335
Diffstat (limited to 'sys/fs/unionfs/union_vfsops.c')
-rw-r--r-- | sys/fs/unionfs/union_vfsops.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/fs/unionfs/union_vfsops.c b/sys/fs/unionfs/union_vfsops.c index c6586e222678..c60b02c27940 100644 --- a/sys/fs/unionfs/union_vfsops.c +++ b/sys/fs/unionfs/union_vfsops.c @@ -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 |