path: root/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c
diff options
authorAttilio Rao <attilio@FreeBSD.org>2008-07-21 23:01:09 +0000
committerAttilio Rao <attilio@FreeBSD.org>2008-07-21 23:01:09 +0000
commit09400d5abe7b07993d6e778050891a31b9dc0915 (patch)
tree3a777195e2dc99a447ae78c9fafb25b15188b6ee /sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c
parentc7971a92eab20900c25dc792bb66f762aed38065 (diff)
- Disallow XFS mounting in write mode. The write support never worked really
and there is no need to maintain it. - Fix vn_get() in order to let it call vget(9) with a valid locking request. vget(9) returns the vnode locked in order to prevent recycling, but in this case internal XFS locks alredy prevent it from happening, so it is safe to drop the vnode lock before to return by vn_get(). - Add a VNASSERT() in vget(9) in order to catch malformed locking requests. Discussed with: kan, kib Tested by: Lothar Braun <lothar at lobraun dot de>
Notes: svn path=/head/; revision=180682
Diffstat (limited to 'sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c')
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c b/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c
index 244ad3099e84..ea815b21e74e 100644
--- a/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c
+++ b/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c
@@ -199,6 +199,8 @@ _xfs_mount(struct mount *mp,
if (mp->mnt_flag & MNT_UPDATE)
return (0);
+ if ((mp->mnt_flag & MNT_RDONLY) == 0)
+ return (EPERM);
xmp = xfsmount_allocate(mp);
if (xmp == NULL)