git: df52ed9f7489 - main - ext2fs: Set st_rdev to NODEV when not a device
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 17 Aug 2025 17:30:05 UTC
The branch main has been updated by des:
URL: https://cgit.FreeBSD.org/src/commit/?id=df52ed9f7489879d678204ad5351ba635f7bdd2d
commit df52ed9f7489879d678204ad5351ba635f7bdd2d
Author: Dag-Erling Smørgrav <des@FreeBSD.org>
AuthorDate: 2025-08-17 17:08:51 +0000
Commit: Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2025-08-17 17:29:27 +0000
ext2fs: Set st_rdev to NODEV when not a device
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D51955
---
sys/fs/ext2fs/ext2_vnops.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/fs/ext2fs/ext2_vnops.c b/sys/fs/ext2fs/ext2_vnops.c
index 669b510cf8ac..00389c927087 100644
--- a/sys/fs/ext2fs/ext2_vnops.c
+++ b/sys/fs/ext2fs/ext2_vnops.c
@@ -360,7 +360,7 @@ ext2_getattr(struct vop_getattr_args *ap)
vap->va_nlink = ip->i_nlink;
vap->va_uid = ip->i_uid;
vap->va_gid = ip->i_gid;
- vap->va_rdev = ip->i_rdev;
+ vap->va_rdev = VN_ISDEV(vp) ? ip->i_rdev : NODEV;
vap->va_size = ip->i_size;
vap->va_atime.tv_sec = ip->i_atime;
vap->va_atime.tv_nsec = E2DI_HAS_XTIME(ip) ? ip->i_atimensec : 0;