Date: Fri, 27 Aug 2021 11:42:47 GMT From: Ka Ho Ng <khng@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: e678b3ee8bf5 - stable/13 - tmpfs: Fix styles Message-ID: <202108271142.17RBgl84080133@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=e678b3ee8bf55e8a2995f50a07cc3f7a0fd63dbf commit e678b3ee8bf55e8a2995f50a07cc3f7a0fd63dbf Author: Ka Ho Ng <khng@FreeBSD.org> AuthorDate: 2021-08-24 13:09:21 +0000 Commit: Ka Ho Ng <khng@FreeBSD.org> CommitDate: 2021-08-27 08:51:43 +0000 tmpfs: Fix styles A lot of return statements were in the wrong style before this commit. Sponsored by: The FreeBSD Foundation (cherry picked from commit c12118f6cec0ca5f720be6c06d6c59d551461e5a) --- sys/fs/tmpfs/tmpfs_subr.c | 6 +++--- sys/fs/tmpfs/tmpfs_vfsops.c | 4 ++-- sys/fs/tmpfs/tmpfs_vnops.c | 26 +++++++++++++------------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c index b7dae82a71b4..387bc741e3cf 100644 --- a/sys/fs/tmpfs/tmpfs_subr.c +++ b/sys/fs/tmpfs/tmpfs_subr.c @@ -714,7 +714,7 @@ tmpfs_alloc_dirent(struct tmpfs_mount *tmp, struct tmpfs_node *node, *de = nde; - return 0; + return (0); } /* @@ -1861,11 +1861,11 @@ tmpfs_chmod(struct vnode *vp, mode_t mode, struct ucred *cred, struct thread *p) /* 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 permissions on a file, must possess VADMIN diff --git a/sys/fs/tmpfs/tmpfs_vfsops.c b/sys/fs/tmpfs/tmpfs_vfsops.c index 7dffb9027946..b8ecedbb0348 100644 --- a/sys/fs/tmpfs/tmpfs_vfsops.c +++ b/sys/fs/tmpfs/tmpfs_vfsops.c @@ -479,7 +479,7 @@ tmpfs_mount(struct mount *mp) vfs_getnewfsid(mp); vfs_mountedfrom(mp, "tmpfs"); - return 0; + return (0); } /* ARGSUSED2 */ @@ -644,7 +644,7 @@ tmpfs_statfs(struct mount *mp, struct statfs *sbp) sbp->f_ffree = sbp->f_files - used; /* sbp->f_owner = tmp->tn_uid; */ - return 0; + return (0); } static int diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c index 5d0d80639046..325b8d2789bb 100644 --- a/sys/fs/tmpfs/tmpfs_vnops.c +++ b/sys/fs/tmpfs/tmpfs_vnops.c @@ -277,9 +277,9 @@ tmpfs_mknod(struct vop_mknod_args *v) if (vap->va_type != VBLK && vap->va_type != VCHR && vap->va_type != VFIFO) - return EINVAL; + return (EINVAL); - return tmpfs_alloc_file(dvp, vpp, vap, cnp, NULL); + return (tmpfs_alloc_file(dvp, vpp, vap, cnp, NULL)); } struct fileops tmpfs_fnops; @@ -517,7 +517,7 @@ tmpfs_getattr(struct vop_getattr_args *v) vap->va_bytes = node->tn_size; vap->va_filerev = 0; - return 0; + return (0); } int @@ -575,7 +575,7 @@ tmpfs_setattr(struct vop_setattr_args *v) MPASS(VOP_ISLOCKED(vp)); - return error; + return (error); } static int @@ -705,7 +705,7 @@ tmpfs_fsync(struct vop_fsync_args *v) tmpfs_check_mtime(vp); tmpfs_update(vp); - return 0; + return (0); } static int @@ -808,7 +808,7 @@ tmpfs_link(struct vop_link_args *v) error = 0; out: - return error; + return (0); } /* @@ -1264,7 +1264,7 @@ tmpfs_mkdir(struct vop_mkdir_args *v) MPASS(vap->va_type == VDIR); - return tmpfs_alloc_file(dvp, vpp, vap, cnp, NULL); + return (tmpfs_alloc_file(dvp, vpp, vap, cnp, NULL)); } static int @@ -1355,7 +1355,7 @@ tmpfs_rmdir(struct vop_rmdir_args *v) error = 0; out: - return error; + return (error); } static int @@ -1373,7 +1373,7 @@ tmpfs_symlink(struct vop_symlink_args *v) vap->va_type = VLNK; #endif - return tmpfs_alloc_file(dvp, vpp, vap, cnp, target); + return (tmpfs_alloc_file(dvp, vpp, vap, cnp, target)); } static int @@ -1396,7 +1396,7 @@ tmpfs_readdir(struct vop_readdir_args *va) /* This operation only makes sense on directory nodes. */ if (vp->v_type != VDIR) - return ENOTDIR; + return (ENOTDIR); maxcookies = 0; node = VP_TO_TMPFS_DIR(vp); @@ -1433,7 +1433,7 @@ tmpfs_readdir(struct vop_readdir_args *va) *eofflag = (error == 0 && uio->uio_offset == TMPFS_DIRCOOKIE_EOF); - return error; + return (error); } static int @@ -1580,7 +1580,7 @@ tmpfs_print(struct vop_print_args *v) printf("\n"); - return 0; + return (0); } int @@ -1634,7 +1634,7 @@ tmpfs_pathconf(struct vop_pathconf_args *v) error = vop_stdpathconf(v); } - return error; + return (error); } static int
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202108271142.17RBgl84080133>