summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/kern/vfs_vnops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index 3187a47641fe..f286960ee97f 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -216,7 +216,7 @@ restart:
#ifndef LOOKUP_EXCLUSIVE
int flock;
- if (!exclusive && vp->v_object == NULL)
+ if (!exclusive && VOP_GETVOBJECT(vp, NULL) != 0)
VOP_LOCK(vp, LK_UPGRADE, td);
/*
* In cases where the object is marked as dead object_create