diff options
author | 2016-08-15 07:39:46 +0000 | |
---|---|---|
committer | 2016-08-15 07:39:46 +0000 | |
commit | 514c5354f8853d80251752aa2b39dc8d690f0ded (patch) | |
tree | c19feff662f36df41cf58a81eaf64abe378b34b8 | |
parent | No need to reset si_selpid after calling selwakeup() the function (diff) | |
download | wireguard-openbsd-514c5354f8853d80251752aa2b39dc8d690f0ded.tar.xz wireguard-openbsd-514c5354f8853d80251752aa2b39dc8d690f0ded.zip |
Neuter fuse_vptofh() and fuse_fhtovp(). I implemented those functions
under the assumption, that fuse_vget() has reasonable semantics, while
this is not the case. fusefs_vget() only functions correctly, if the
file in questions has recently been accessed and is still in the vnode
cache of the userspace daemon associated with the mount point.
As a matter of fact the fuse api doesn't feature a reasonable way to map
inode numbers to a handle at all (see struct fuse_operations).
ok guenther
-rw-r--r-- | sys/miscfs/fuse/fuse_vfsops.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/sys/miscfs/fuse/fuse_vfsops.c b/sys/miscfs/fuse/fuse_vfsops.c index 162860c2067..9780f0760f1 100644 --- a/sys/miscfs/fuse/fuse_vfsops.c +++ b/sys/miscfs/fuse/fuse_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fuse_vfsops.c,v 1.25 2016/08/13 11:42:46 natano Exp $ */ +/* $OpenBSD: fuse_vfsops.c,v 1.26 2016/08/15 07:39:46 natano Exp $ */ /* * Copyright (c) 2012-2013 Sylvestre Gallon <ccna.syl@gmail.com> * @@ -300,28 +300,13 @@ retry: int fusefs_fhtovp(struct mount *mp, struct fid *fhp, struct vnode **vpp) { - struct ufid *ufhp; - - ufhp = (struct ufid *)fhp; - if (ufhp->ufid_len != sizeof(struct ufid) || - ufhp->ufid_ino < FUSE_ROOTINO) - return (ESTALE); - - return (VFS_VGET(mp, ufhp->ufid_ino, vpp)); + return (EINVAL); } int fusefs_vptofh(struct vnode *vp, struct fid *fhp) { - struct fusefs_node *ip; - struct ufid *ufhp; - - ip = VTOI(vp); - ufhp = (struct ufid *)fhp; - ufhp->ufid_len = sizeof(struct ufid); - ufhp->ufid_ino = ip->ufs_ino.i_number; - - return (0); + return (EINVAL); } int |