summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2008-07-21 23:01:09 +0000
committerattilio <attilio@FreeBSD.org>2008-07-21 23:01:09 +0000
commit823ce79a5bcafc8eb919f84fef6937a5636d1978 (patch)
tree3a777195e2dc99a447ae78c9fafb25b15188b6ee /sys/kern
parent412a8c5e97b26e71c5eb64fedbc644cb9177d3c8 (diff)
downloadFreeBSD-src-823ce79a5bcafc8eb919f84fef6937a5636d1978.zip
FreeBSD-src-823ce79a5bcafc8eb919f84fef6937a5636d1978.tar.gz
- 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>
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/vfs_subr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 2e7f52b..16fa8e4 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -2038,6 +2038,8 @@ vget(struct vnode *vp, int flags, struct thread *td)
error = 0;
VFS_ASSERT_GIANT(vp->v_mount);
+ VNASSERT((flags & LK_TYPE_MASK) != 0, vp,
+ ("vget: invalid lock operation"));
if ((flags & LK_INTERLOCK) == 0)
VI_LOCK(vp);
vholdl(vp);
OpenPOWER on IntegriCloud