svn commit: r364416 - head/sys/fs/ext2fs
    Pedro F. Giffuni 
    pfg at FreeBSD.org
       
    Thu Aug 20 05:08:50 UTC 2020
    
    
  
Author: pfg
Date: Thu Aug 20 05:08:49 2020
New Revision: 364416
URL: https://svnweb.freebsd.org/changeset/base/364416
Log:
  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
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	Thu Aug 20 03:53:18 2020	(r364415)
+++ head/sys/fs/ext2fs/ext2_inode_cnv.c	Thu Aug 20 05:08:49 2020	(r364416)
@@ -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);
    
    
More information about the svn-src-all
mailing list