git: 1797e69477cd - stable/13 - tmpfs: minor style
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 20 Jan 2023 03:23:23 UTC
The branch stable/13 has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=1797e69477cdfbd3f0e59c52fda8a9877f5a6544
commit 1797e69477cdfbd3f0e59c52fda8a9877f5a6544
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2022-10-24 13:30:38 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2023-01-20 03:18:56 +0000
tmpfs: minor style
Tested by: pho
(cherry picked from commit e77f2f9dc683bb5ac725c5844fc36c831138e841)
---
sys/fs/tmpfs/tmpfs_vnops.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c
index f46c0ef9490f..788e966fedb7 100644
--- a/sys/fs/tmpfs/tmpfs_vnops.c
+++ b/sys/fs/tmpfs/tmpfs_vnops.c
@@ -479,8 +479,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));
}
@@ -513,12 +514,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);