From nobody Fri Dec 09 12:17:33 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NT9592ctpz4kPft; Fri, 9 Dec 2022 12:17:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NT95927jKz3qYZ; Fri, 9 Dec 2022 12:17:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1670588253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mAnRheT7q4szBxVv55G2EdZgI+jP01Coa+Yb5LIKL5M=; b=WtZhGJ4rs3bKJltWZCwl2U5vaGr5GfneXsIQWptF1M+wvsraBK/8rl6FcIYAdIHvdlY5mr sqpHgJwBjnJa4CqLQHqDif+CJVGciQhMOWmaU5JfgDol7A/RMi09+9fgRAJKGQ+1lQnkyP oMfSHba73T88h61C4KNi/i1vVKqU706NKt4isD7wCMkktzx6/cSKGGTa0IVqdsnYxPJoIv NuoXn2Z3KbL27tajzqYCdTp7tylE0oqspUVGCb4ZfOqVdcW251g6VQtEHOdjAwgH+dlLJi peknfCoBGD0lu7Ypm82JBXvlUcnhNFyohGpOwPc3dWw1dRY8I+GOCoRWUIBSbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1670588253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mAnRheT7q4szBxVv55G2EdZgI+jP01Coa+Yb5LIKL5M=; b=lL1XExY27cpnnbNJMIAYbSz2Wt3bmJ8DdxmRbnwrIAVPSuNweAISHQBCVM7I45uxQSiffP 3lety1m+nntGO0aIWa0D1Zged6XnSI9oojOyXOBpibAkwzizKYDdDuVTirPwmA9Xq9v7Am w2+Of2Lg/O/JrApZzRVf9vJwyz+iCKbPg+ypy1UQkj4IOi9Jim0mtDzqLuwcfob8cTyFIi bgns2Fpya5bErg3wO6zs37GmUyd3v2JgLhwHrqcXD7ZI8KLXPmyjTf9mlwP+p9UFtHoTzq 6SUF8PH2N2lcWMeDH+HPdv4kh1JWBT2lc146L04pAqhxA1T1TRk9ng7F049cAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1670588253; a=rsa-sha256; cv=none; b=YvsoUS/YS5ddobZJBMPqT/8rfyXvi9K5l9M7GHyYiXiLve9b2eKnt5amDm5Zvz3PqN2O30 hmoRmLkjDYLMaFieKztk6W18NUG2Rza3PUYNzwerYlv54yLOzRSDgK7OOcParupFzUkT7k P2rsT88X/mVvmD4x2+SAOwKiuBikTjdnAGIXY9Hazji+ylHeHOzsyNwZlplXOWnknxewHj Yp3LDWKJfFjcdfn8q9J2vX+LEG1SajewvohxoAlcOcjyWl1AVWYN333OsVvq8N0muMV6id aTEbQ6jSm8ojGr4KD6uUDrNse4GkVy2lgu4b7k0LkYGIkY9QlpkvQjE/eLReMg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NT9591DHCzbNc; Fri, 9 Dec 2022 12:17:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2B9CHXHK086293; Fri, 9 Dec 2022 12:17:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2B9CHX9R086292; Fri, 9 Dec 2022 12:17:33 GMT (envelope-from git) Date: Fri, 9 Dec 2022 12:17:33 GMT Message-Id: <202212091217.2B9CHX9R086292@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: e77f2f9dc683 - main - tmpfs: minor style List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e77f2f9dc683bb5ac725c5844fc36c831138e841 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e77f2f9dc683bb5ac725c5844fc36c831138e841 commit e77f2f9dc683bb5ac725c5844fc36c831138e841 Author: Konstantin Belousov AuthorDate: 2022-10-24 13:30:38 +0000 Commit: Konstantin Belousov CommitDate: 2022-12-09 12:15:37 +0000 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 --- 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 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);