diff options
author | Konstantin Belousov <kib@FreeBSD.org> | 2022-10-24 13:30:38 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2022-12-09 12:15:37 +0000 |
commit | e77f2f9dc683bb5ac725c5844fc36c831138e841 (patch) | |
tree | f9e7b5d03815120c185f1120c8beb40e1512360d | |
parent | 7ec4b29b086b67b8c778d2bc50c90e9e0655c03e (diff) | |
download | src-e77f2f9dc683bb5ac725c5844fc36c831138e841.tar.gz src-e77f2f9dc683bb5ac725c5844fc36c831138e841.zip |
tmpfs: minor style
Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D37097
-rw-r--r-- | sys/fs/tmpfs/tmpfs_vnops.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c index 96ceb0ad5198..6b53f002c8ac 100644 --- a/sys/fs/tmpfs/tmpfs_vnops.c +++ b/sys/fs/tmpfs/tmpfs_vnops.c @@ -472,8 +472,9 @@ tmpfs_stat(struct vop_stat_args *v) if (vp->v_type == VREG) { obj = node->tn_reg.tn_aobj; sb->st_blocks = (u_quad_t)obj->resident_page_count * PAGE_SIZE; - } else + } else { sb->st_blocks = node->tn_size; + } sb->st_blocks /= S_BLKSIZE; return (vop_stat_helper_post(v, error)); } @@ -506,12 +507,13 @@ tmpfs_getattr(struct vop_getattr_args *v) vap->va_gen = node->tn_gen; vap->va_flags = node->tn_flags; vap->va_rdev = (vp->v_type == VBLK || vp->v_type == VCHR) ? - node->tn_rdev : NODEV; + node->tn_rdev : NODEV; if (vp->v_type == VREG) { obj = node->tn_reg.tn_aobj; vap->va_bytes = (u_quad_t)obj->resident_page_count * PAGE_SIZE; - } else + } else { vap->va_bytes = node->tn_size; + } vap->va_filerev = 0; return (0); |