summaryrefslogtreecommitdiffstats
path: root/sys/fs/udf/udf_vfsops.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/fs/udf/udf_vfsops.c')
-rw-r--r--sys/fs/udf/udf_vfsops.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/fs/udf/udf_vfsops.c b/sys/fs/udf/udf_vfsops.c
index 706816e..672bdeb 100644
--- a/sys/fs/udf/udf_vfsops.c
+++ b/sys/fs/udf/udf_vfsops.c
@@ -201,7 +201,9 @@ udf_mount(struct mount *mp, struct thread *td)
/*
* Unconditionally mount as read-only.
*/
+ MNT_ILOCK(mp);
mp->mnt_flag |= MNT_RDONLY;
+ MNT_IUNLOCK(mp);
/*
* No root filesystem support. Probably not a big deal, since the
@@ -341,7 +343,9 @@ udf_mountfs(struct vnode *devvp, struct mount *mp, struct thread *td) {
mp->mnt_data = (qaddr_t)udfmp;
mp->mnt_stat.f_fsid.val[0] = dev2udev(devvp->v_rdev);
mp->mnt_stat.f_fsid.val[1] = mp->mnt_vfc->vfc_typenum;
+ MNT_ILOCK(mp);
mp->mnt_flag |= MNT_LOCAL;
+ MNT_IUNLOCK(mp);
udfmp->im_mountp = mp;
udfmp->im_dev = devvp->v_rdev;
udfmp->im_devvp = devvp;
@@ -532,7 +536,9 @@ udf_unmount(struct mount *mp, int mntflags, struct thread *td)
FREE(udfmp, M_UDFMOUNT);
mp->mnt_data = (qaddr_t)0;
+ MNT_ILOCK(mp);
mp->mnt_flag &= ~MNT_LOCAL;
+ MNT_IUNLOCK(mp);
return (0);
}
OpenPOWER on IntegriCloud