summaryrefslogtreecommitdiffstats
path: root/sys/fs/nullfs/null.h
diff options
context:
space:
mode:
authorsemenu <semenu@FreeBSD.org>2002-06-13 21:49:09 +0000
committersemenu <semenu@FreeBSD.org>2002-06-13 21:49:09 +0000
commit50d99cdfecd92f5323a18aa791a5b1cb9d8b7191 (patch)
tree6951958eefa7c3d066580c5bb379863dacb57268 /sys/fs/nullfs/null.h
parente930b35ecdd23d857aaa5efd37d78e7bfc0b3966 (diff)
downloadFreeBSD-src-50d99cdfecd92f5323a18aa791a5b1cb9d8b7191.zip
FreeBSD-src-50d99cdfecd92f5323a18aa791a5b1cb9d8b7191.tar.gz
Fix a race during null node creation between relookuping the hash and
adding vnode to hash. The fix is to use atomic hash-lookup-and-add-if- not-found operation. The odd thing is that this race can't happen actually because the lowervp vnode is locked exclusively now during the whole process of null node creation. This must be thought as a step toward shared lookups. Also remove vp->v_mount checks when looking for a match in the hash, as this is the vestige. Also add comments and cosmetic changes.
Diffstat (limited to 'sys/fs/nullfs/null.h')
-rw-r--r--sys/fs/nullfs/null.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/fs/nullfs/null.h b/sys/fs/nullfs/null.h
index 718deaa..3cb3716 100644
--- a/sys/fs/nullfs/null.h
+++ b/sys/fs/nullfs/null.h
@@ -59,7 +59,7 @@ struct null_node {
int nullfs_init(struct vfsconf *vfsp);
int nullfs_uninit(struct vfsconf *vfsp);
-int null_node_create(struct mount *mp, struct vnode *target, struct vnode **vpp);
+int null_nodeget(struct mount *mp, struct vnode *target, struct vnode **vpp);
void null_hashrem(struct null_node *xp);
int null_bypass(struct vop_generic_args *ap);
OpenPOWER on IntegriCloud