summaryrefslogtreecommitdiff
path: root/sys/ufs
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2024-09-10 12:14:27 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2024-09-10 12:14:27 +0000
commitbe622aa3869af6c3851e457450dfb0b300614b23 (patch)
tree6d103f168a84431b10ee1b351de53d259509f979 /sys/ufs
parentac03559eec9c9884aca86e9bec3adad306c61cad (diff)
ufs_ihashget() is also used by the ext2fs code but the DIP() makro does
not handle that. So for now add an ugly hack here to support ext2fs. This fixes access to ext2fs after the last commit. A better fix can be implemented in tree. Reported and OK anton@
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ufs/ufs_ihash.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/ufs/ufs/ufs_ihash.c b/sys/ufs/ufs/ufs_ihash.c
index b0d6ca3a5dd..3e299361a5b 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.28 2024/09/04 17:00:08 beck Exp $ */
+/* $OpenBSD: ufs_ihash.c,v 1.29 2024/09/10 12:14:26 claudio Exp $ */
/* $NetBSD: ufs_ihash.c,v 1.3 1996/02/09 22:36:04 christos Exp $ */
/*
@@ -42,6 +42,7 @@
#include <ufs/ufs/inode.h>
#include <ufs/ufs/ufs_extern.h>
#include <ufs/ufs/ufsmount.h>
+#include <ufs/ext2fs/ext2fs_extern.h>
#include <crypto/siphash.h>
@@ -109,7 +110,11 @@ loop:
* dealt with so this can't happen.
*/
if (VTOI(vp) != ip ||
- (DIP(ip, nlink) <= 0 &&
+ ((
+#ifdef EXT2FS
+ IS_EXT2_VNODE(ip->i_vnode) ? ip->i_e2fs_nlink <= 0 :
+#endif
+ DIP(ip, nlink) <= 0) &&
(vp->v_mount->mnt_flag & MNT_RDONLY) == 0)) {
/*
* This should recycle the inode immediately,