From 34e66c63243857bd9f032d94dc91dad156f76033 Mon Sep 17 00:00:00 2001 From: pfg Date: Thu, 20 Aug 2020 05:08:49 +0000 Subject: [PATCH] extfs: remove redundant little endian conversion. The XTIME_TO_NSEC macro already calls the htole32(), so there is no need to call it twice. This code does nothing on LE platforms and affects only nanosecond and birthtime fields so it's difficult to notice on regular use. Hinted by: DragonFlyBSD (git ae503f8f6f4b9a413932ffd68be029f20c38cab4) X-MFC with: r361136 --- sys/fs/ext2fs/ext2_inode_cnv.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/fs/ext2fs/ext2_inode_cnv.c b/sys/fs/ext2fs/ext2_inode_cnv.c index 752aaa819842..f7be38337fcc 100644 --- a/sys/fs/ext2fs/ext2_inode_cnv.c +++ b/sys/fs/ext2fs/ext2_inode_cnv.c @@ -146,11 +146,11 @@ ext2_ei2i(struct ext2fs_dinode *ei, struct inode *ip) ip->i_mtime = le32toh(ei->e2di_mtime); ip->i_ctime = le32toh(ei->e2di_ctime); if (E2DI_HAS_XTIME(ip)) { - ip->i_atimensec = XTIME_TO_NSEC(le32toh(ei->e2di_atime_extra)); - ip->i_mtimensec = XTIME_TO_NSEC(le32toh(ei->e2di_mtime_extra)); - ip->i_ctimensec = XTIME_TO_NSEC(le32toh(ei->e2di_ctime_extra)); + ip->i_atimensec = XTIME_TO_NSEC(ei->e2di_atime_extra); + ip->i_mtimensec = XTIME_TO_NSEC(ei->e2di_mtime_extra); + ip->i_ctimensec = XTIME_TO_NSEC(ei->e2di_ctime_extra); ip->i_birthtime = le32toh(ei->e2di_crtime); - ip->i_birthnsec = XTIME_TO_NSEC(le32toh(ei->e2di_crtime_extra)); + ip->i_birthnsec = XTIME_TO_NSEC(ei->e2di_crtime_extra); } ip->i_flags = 0; ei_flags_host = le32toh(ei->e2di_flags);