From 094b1430b880003c384326939330a33208105409 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Mon, 26 Aug 2024 00:11:19 +0200 Subject: ext2fs: Fix masking out translators bits We need to mask out before shifting the bits. --- ext2fs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext2fs') 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); -- cgit v1.2.3