svn commit: r366453 - head/sys/ufs/ufs

Chuck Silvers chs at FreeBSD.org
Mon Oct 5 18:17:51 UTC 2020


Author: chs
Date: Mon Oct  5 18:17:50 2020
New Revision: 366453
URL: https://svnweb.freebsd.org/changeset/base/366453

Log:
  ufs: restore uniqueness of st_dev as returned by ufs_stat()
  
  switch ufs_stat() to use the same value for st_dev as was used by
  the previous ufs_getattr() stat path.
  
  Submitted by:	gallatin
  Reviewed by:	mjg, imp, kib, mckusick
  Sponsored by:	Netflix
  Differential Revision:	https://reviews.freebsd.org/D26596

Modified:
  head/sys/ufs/ufs/ufs_vnops.c

Modified: head/sys/ufs/ufs/ufs_vnops.c
==============================================================================
--- head/sys/ufs/ufs/ufs_vnops.c	Mon Oct  5 18:08:52 2020	(r366452)
+++ head/sys/ufs/ufs/ufs_vnops.c	Mon Oct  5 18:17:50 2020	(r366453)
@@ -498,7 +498,7 @@ ufs_stat(struct vop_stat_args *ap)
 	}
 	VI_UNLOCK(vp);
 
-	sb->st_dev = vp->v_mount->mnt_stat.f_fsid.val[0];
+	sb->st_dev = dev2udev(ITOUMP(ip)->um_dev);
 	sb->st_ino = ip->i_number;
 	sb->st_mode = (ip->i_mode & ~IFMT) | VTTOIF(vp->v_type);
 	sb->st_nlink = ip->i_effnlink;


More information about the svn-src-head mailing list