From owner-svn-src-all@freebsd.org Sat Sep 19 18:02:56 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A036A3EA6F9; Sat, 19 Sep 2020 18:02:56 +0000 (UTC) (envelope-from kib@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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Btz803rKcz4J42; Sat, 19 Sep 2020 18:02:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 669EB1041B; Sat, 19 Sep 2020 18:02:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08JI2uSk079326; Sat, 19 Sep 2020 18:02:56 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08JI2uK3079325; Sat, 19 Sep 2020 18:02:56 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202009191802.08JI2uK3079325@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 19 Sep 2020 18:02:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r365908 - stable/12/sys/fs/tmpfs X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/fs/tmpfs X-SVN-Commit-Revision: 365908 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Sep 2020 18:02:56 -0000 Author: kib Date: Sat Sep 19 18:02:55 2020 New Revision: 365908 URL: https://svnweb.freebsd.org/changeset/base/365908 Log: MFC r365809: Style. Modified: stable/12/sys/fs/tmpfs/tmpfs_subr.c stable/12/sys/fs/tmpfs/tmpfs_vnops.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- stable/12/sys/fs/tmpfs/tmpfs_subr.c Sat Sep 19 16:15:22 2020 (r365907) +++ stable/12/sys/fs/tmpfs/tmpfs_subr.c Sat Sep 19 18:02:55 2020 (r365908) @@ -1584,7 +1584,7 @@ tmpfs_chflags(struct vnode *vp, u_long flags, struct u /* Disallow this operation if the file system is mounted read-only. */ if (vp->v_mount->mnt_flag & MNT_RDONLY) - return EROFS; + return (EROFS); /* * Callers may only modify the file flags on objects they @@ -1703,11 +1703,11 @@ tmpfs_chown(struct vnode *vp, uid_t uid, gid_t gid, st /* Disallow this operation if the file system is mounted read-only. */ if (vp->v_mount->mnt_flag & MNT_RDONLY) - return EROFS; + return (EROFS); /* Immutable or append-only files cannot be modified, either. */ if (node->tn_flags & (IMMUTABLE | APPEND)) - return EPERM; + return (EPERM); /* * To modify the ownership of a file, must possess VADMIN for that @@ -1764,11 +1764,11 @@ tmpfs_chsize(struct vnode *vp, u_quad_t size, struct u error = 0; switch (vp->v_type) { case VDIR: - return EISDIR; + return (EISDIR); case VREG: if (vp->v_mount->mnt_flag & MNT_RDONLY) - return EROFS; + return (EROFS); break; case VBLK: @@ -1776,23 +1776,27 @@ tmpfs_chsize(struct vnode *vp, u_quad_t size, struct u case VCHR: /* FALLTHROUGH */ case VFIFO: - /* Allow modifications of special files even if in the file + /* + * Allow modifications of special files even if in the file * system is mounted read-only (we are not modifying the - * files themselves, but the objects they represent). */ - return 0; + * files themselves, but the objects they represent). + */ + return (0); default: /* Anything else is unsupported. */ - return EOPNOTSUPP; + return (EOPNOTSUPP); } /* Immutable or append-only files cannot be modified, either. */ if (node->tn_flags & (IMMUTABLE | APPEND)) - return EPERM; + return (EPERM); error = tmpfs_truncate(vp, size); - /* tmpfs_truncate will raise the NOTE_EXTEND and NOTE_ATTRIB kevents - * for us, as will update tn_status; no need to do that here. */ + /* + * tmpfs_truncate will raise the NOTE_EXTEND and NOTE_ATTRIB kevents + * for us, as will update tn_status; no need to do that here. + */ ASSERT_VOP_ELOCKED(vp, "chsize2"); @@ -1817,11 +1821,11 @@ tmpfs_chtimes(struct vnode *vp, struct vattr *vap, /* Disallow this operation if the file system is mounted read-only. */ if (vp->v_mount->mnt_flag & MNT_RDONLY) - return EROFS; + return (EROFS); /* Immutable or append-only files cannot be modified, either. */ if (node->tn_flags & (IMMUTABLE | APPEND)) - return EPERM; + return (EPERM); error = vn_utimes_perm(vp, vap, cred, l); if (error != 0) Modified: stable/12/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- stable/12/sys/fs/tmpfs/tmpfs_vnops.c Sat Sep 19 16:15:22 2020 (r365907) +++ stable/12/sys/fs/tmpfs/tmpfs_vnops.c Sat Sep 19 18:02:55 2020 (r365908) @@ -368,7 +368,7 @@ tmpfs_access(struct vop_access_args *v) out: MPASS(VOP_ISLOCKED(vp)); - return error; + return (error); } int @@ -455,9 +455,11 @@ tmpfs_setattr(struct vop_setattr_args *v) vap->va_birthtime.tv_nsec != VNOVAL))) error = tmpfs_chtimes(vp, vap, cred, td); - /* Update the node times. We give preference to the error codes + /* + * Update the node times. We give preference to the error codes * generated by this function rather than the ones that may arise - * from tmpfs_update. */ + * from tmpfs_update. + */ tmpfs_update(vp); MPASS(VOP_ISLOCKED(vp)); @@ -595,8 +597,7 @@ tmpfs_remove(struct vop_remove_args *v) error = 0; out: - - return error; + return (error); } static int