commit 094b1430b880003c384326939330a33208105409
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Mon Aug 26 00:11:19 2024 +0200

    ext2fs: Fix masking out translators bits
    
    We need to mask out before shifting the bits.

commit 4e23f6c0354376b18502443b3ec8102bb657466d
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Mon Aug 26 00:12:09 2024 +0200

    ext2fs: Ignore translators bits when checking we have no Hurd extensions
    
    We don't actually want to write these anyway.

diff --git a/ext2fs/inode.c b/ext2fs/inode.c
index bcb1ffed..4ccd6b36 100644
--- a/ext2fs/inode.c
+++ b/ext2fs/inode.c
@@ -399,7 +399,7 @@ write_node (struct node *np)
       if (sblock->s_creator_os == htole32 (EXT2_OS_HURD))
 	/* If this is a hurd-compatible filesystem, write the high bits too. */
 	{
-	  di->i_mode_high = htole16 ((st->st_mode >> 16) & 0xffff & ~S_ITRANS);
+	  di->i_mode_high = htole16 (((st->st_mode & ~S_ITRANS) >> 16) & 0xffff);
 	  di->i_uid_high = htole16 (st->st_uid >> 16);
 	  di->i_gid_high = htole16 (st->st_gid >> 16);
 	  di->i_author = htole32 (st->st_author);
diff --git a/ext2fs/inode.c b/ext2fs/inode.c
index 4ccd6b36..a23baee7 100644
--- a/ext2fs/inode.c
+++ b/ext2fs/inode.c
@@ -409,7 +409,7 @@ write_node (struct node *np)
 	{
 	  assert_backtrace ((st->st_uid & ~0xFFFF) == 0);
 	  assert_backtrace ((st->st_gid & ~0xFFFF) == 0);
-	  assert_backtrace ((st->st_mode & ~0xFFFF) == 0);
+	  assert_backtrace (((st->st_mode & ~S_ITRANS) & ~0xFFFF) == 0);
 	  assert_backtrace (np->author_tracks_uid && st->st_author == st->st_uid);
 	}
 
