Module Name:    src
Committed By:   jdolecek
Date:           Sun Aug 14 11:42:50 UTC 2016

Modified Files:
        src/sys/ufs/ext2fs: ext2fs.h ext2fs_htree.c

Log Message:
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


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/ufs/ext2fs/ext2fs.h
cvs rdiff -u -r1.5 -r1.6 src/sys/ufs/ext2fs/ext2fs_htree.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/ufs/ext2fs/ext2fs.h
diff -u src/sys/ufs/ext2fs/ext2fs.h:1.44 src/sys/ufs/ext2fs/ext2fs.h:1.45
--- src/sys/ufs/ext2fs/ext2fs.h:1.44	Sun Aug 14 11:40:31 2016
+++ src/sys/ufs/ext2fs/ext2fs.h	Sun Aug 14 11:42:50 2016
@@ -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)

Index: src/sys/ufs/ext2fs/ext2fs_htree.c
diff -u src/sys/ufs/ext2fs/ext2fs_htree.c:1.5 src/sys/ufs/ext2fs/ext2fs_htree.c:1.6
--- src/sys/ufs/ext2fs/ext2fs_htree.c:1.5	Sat Aug 13 07:40:10 2016
+++ src/sys/ufs/ext2fs/ext2fs_htree.c	Sun Aug 14 11:42:50 2016
@@ -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 <l...@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
 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);
 }
 

Reply via email to