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
This commit is contained in:
parent
6bd2592f36
commit
03d15df771
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue