diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2024-09-11 08:29:56 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2024-09-11 08:29:56 +0000 |
commit | afd0874b66f39f0f1ca8887afcb542877efdb1d3 (patch) | |
tree | 353476b29757cb83271ca0f73a6754bbd24ba68f | |
parent | 10a0cbc06ef5b18f5008598e070baae40e926890 (diff) |
While I can understand that ext2fs is using ufs_ihashget() I'm still
flabbergasted by the abuse from fuse.
For whatever dumb reason fuse uses the ufs inode instead of having its
own much simpler struct. Again this is a workaround to not crash when
fuse is used.
OK beck@
-rw-r--r-- | sys/ufs/ufs/ufs_ihash.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/sys/ufs/ufs/ufs_ihash.c b/sys/ufs/ufs/ufs_ihash.c index 3e299361a5b..1c31867e876 100644 --- a/sys/ufs/ufs/ufs_ihash.c +++ b/sys/ufs/ufs/ufs_ihash.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ufs_ihash.c,v 1.29 2024/09/10 12:14:26 claudio Exp $ */ +/* $OpenBSD: ufs_ihash.c,v 1.30 2024/09/11 08:29:55 claudio Exp $ */ /* $NetBSD: ufs_ihash.c,v 1.3 1996/02/09 22:36:04 christos Exp $ */ /* @@ -109,10 +109,25 @@ loop: * the previously committed vdoom() or this should be * dealt with so this can't happen. */ +#ifdef FUSE + /* + * XXX for whatever stupid reason fuse decided to + * use ufs inodes and with this ufs_ihashget. + * fuse needs to grow up and use its own inode + * structure and hash. + */ + if (vp->v_tag == VT_FUSEFS) + return (vp); +#endif if (VTOI(vp) != ip || (( #ifdef EXT2FS - IS_EXT2_VNODE(ip->i_vnode) ? ip->i_e2fs_nlink <= 0 : + /* + * XXX DIP does not cover ext2fs so hack + * around this for now since this is using + * ufs_ihashget as well. + */ + IS_EXT2_VNODE(vp) ? ip->i_e2fs_nlink <= 0 : #endif DIP(ip, nlink) <= 0) && (vp->v_mount->mnt_flag & MNT_RDONLY) == 0)) { |