diff options
| author | jdolecek <jdolecek@NetBSD.org> | 2016-08-14 11:42:50 +0000 |
|---|---|---|
| committer | jdolecek <jdolecek@NetBSD.org> | 2016-08-14 11:42:50 +0000 |
| commit | dfbea7b490af352a3d7021130fcdcbfaceae4fbb (patch) | |
| tree | 44b8972a44e33af1ff447278a6f836ee642a705d | |
| parent | 436442ccf0c0c335949e67ed9e9f0b704ed2a047 (diff) | |
switch ext2fs_htree_has_idx() over to EXT2F_HAS_COMPAT_FEATURE() and remove EXT2F_HAS_COMPAT_FEATURE() - this also fixes it for BE machines, as EXT2F_HAS_COMPAT_FEATURE() did extra byte swap; also remove XXX comment about IN_E3INDEX
| -rw-r--r-- | sys/ufs/ext2fs/ext2fs.h | 4 | ||||
| -rw-r--r-- | sys/ufs/ext2fs/ext2fs_htree.c | 7 |
2 files changed, 4 insertions, 7 deletions
diff --git a/sys/ufs/ext2fs/ext2fs.h b/sys/ufs/ext2fs/ext2fs.h index 79fed0c715d..04549288cbb 100644 --- a/sys/ufs/ext2fs/ext2fs.h +++ b/sys/ufs/ext2fs/ext2fs.h @@ -1,4 +1,4 @@ -/* $NetBSD: ext2fs.h,v 1.44 2016/08/14 11:40:31 jdolecek Exp $ */ +/* $NetBSD: ext2fs.h,v 1.45 2016/08/14 11:42:50 jdolecek Exp $ */ /* * Copyright (c) 1982, 1986, 1993 @@ -365,8 +365,6 @@ struct m_ext2fs { /* * Feature set definitions */ -#define EXT2_HAS_COMPAT_FEATURE(sb, mask) \ - ((sb)->e2fs.e2fs_features_compat & htole32(mask)) #define EXT2F_HAS_COMPAT_FEATURE(fs, feature) \ ((fs)->e2fs.e2fs_rev >= E2FS_REV1 && \ ((fs)->e2fs.e2fs_features_compat & (feature)) != 0) diff --git a/sys/ufs/ext2fs/ext2fs_htree.c b/sys/ufs/ext2fs/ext2fs_htree.c index 58a4ef9c792..1c287ef73dc 100644 --- a/sys/ufs/ext2fs/ext2fs_htree.c +++ b/sys/ufs/ext2fs/ext2fs_htree.c @@ -1,4 +1,4 @@ -/* $NetBSD: ext2fs_htree.c,v 1.5 2016/08/13 07:40:10 christos Exp $ */ +/* $NetBSD: ext2fs_htree.c,v 1.6 2016/08/14 11:42:50 jdolecek Exp $ */ /*- * Copyright (c) 2010, 2012 Zheng Liu <lz@freebsd.org> @@ -29,7 +29,7 @@ * $FreeBSD: head/sys/fs/ext2fs/ext2fs_htree.c 294653 2016-01-24 02:41:49Z pfg $ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ext2fs_htree.c,v 1.5 2016/08/13 07:40:10 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ext2fs_htree.c,v 1.6 2016/08/14 11:42:50 jdolecek Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -65,8 +65,7 @@ static int ext2fs_htree_find_leaf(struct inode *, const char *, int , int ext2fs_htree_has_idx(struct inode *ip) { - /* XXX ip->i_flags should have got checked here for IN_E3INDEX */ - return EXT2_HAS_COMPAT_FEATURE(ip->i_e2fs, EXT2F_COMPAT_DIRHASHINDEX) + return EXT2F_HAS_COMPAT_FEATURE(ip->i_e2fs, EXT2F_COMPAT_DIRHASHINDEX) && (ip->i_din.e2fs_din->e2di_flags & EXT2_INDEX); } |
