Date: Mon, 17 Aug 2020 15:05:42 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r364308 - head/sys/fs/ext2fs Message-ID: <202008171505.07HF5gQL039507@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Mon Aug 17 15:05:41 2020 New Revision: 364308 URL: https://svnweb.freebsd.org/changeset/base/364308 Log: extfs: remove redundant little endian conversion. The NSEC_TO_XTIME 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. X-MFC with: r361136 Modified: head/sys/fs/ext2fs/ext2_inode_cnv.c Modified: head/sys/fs/ext2fs/ext2_inode_cnv.c ============================================================================== --- head/sys/fs/ext2fs/ext2_inode_cnv.c Mon Aug 17 14:07:29 2020 (r364307) +++ head/sys/fs/ext2fs/ext2_inode_cnv.c Mon Aug 17 15:05:41 2020 (r364308) @@ -213,11 +213,11 @@ ext2_i2ei(struct inode *ip, struct ext2fs_dinode *ei) ei->e2di_dtime = htole32(le16toh(ei->e2di_nlink) ? 0 : le32toh(ei->e2di_mtime)); if (E2DI_HAS_XTIME(ip)) { - ei->e2di_ctime_extra = htole32(NSEC_TO_XTIME(ip->i_ctimensec)); - ei->e2di_mtime_extra = htole32(NSEC_TO_XTIME(ip->i_mtimensec)); - ei->e2di_atime_extra = htole32(NSEC_TO_XTIME(ip->i_atimensec)); + ei->e2di_ctime_extra = NSEC_TO_XTIME(ip->i_ctimensec); + ei->e2di_mtime_extra = NSEC_TO_XTIME(ip->i_mtimensec); + ei->e2di_atime_extra = NSEC_TO_XTIME(ip->i_atimensec); ei->e2di_crtime = htole32(ip->i_birthtime); - ei->e2di_crtime_extra = htole32(NSEC_TO_XTIME(ip->i_birthnsec)); + ei->e2di_crtime_extra = NSEC_TO_XTIME(ip->i_birthnsec); } /* Keep these in host endian for a while since they change a lot */ ei->e2di_flags = 0;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202008171505.07HF5gQL039507>