From 8b88330ed612e81384ebd04cee5c58ca2bd51f0a Mon Sep 17 00:00:00 2001 From: Chuck Silvers Date: Mon, 5 Oct 2020 18:17:50 +0000 Subject: [PATCH] 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 --- sys/ufs/ufs/ufs_vnops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index dd073dc143f6..408deb10ff22 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -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;