From owner-svn-src-all@FreeBSD.ORG Mon Jul 14 09:02:40 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B3A0C510; Mon, 14 Jul 2014 09:02:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A13BF203F; Mon, 14 Jul 2014 09:02:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6E92eJX042371; Mon, 14 Jul 2014 09:02:40 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6E92evV042370; Mon, 14 Jul 2014 09:02:40 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201407140902.s6E92evV042370@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 14 Jul 2014 09:02:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r268611 - head/sys/fs/tmpfs X-SVN-Group: head 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.18 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: Mon, 14 Jul 2014 09:02:40 -0000 Author: kib Date: Mon Jul 14 09:02:40 2014 New Revision: 268611 URL: http://svnweb.freebsd.org/changeset/base/268611 Log: In tmpfs_alloc_file(), code after the 'out' label does only 'return error;'. Replace goto's with the return. Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/fs/tmpfs/tmpfs_subr.c Modified: head/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_subr.c Mon Jul 14 08:59:25 2014 (r268610) +++ head/sys/fs/tmpfs/tmpfs_subr.c Mon Jul 14 09:02:40 2014 (r268611) @@ -677,8 +677,7 @@ tmpfs_alloc_file(struct vnode *dvp, stru * imposed by the system. */ MPASS(dnode->tn_links <= LINK_MAX); if (dnode->tn_links == LINK_MAX) { - error = EMLINK; - goto out; + return (EMLINK); } parent = dnode; @@ -690,14 +689,14 @@ tmpfs_alloc_file(struct vnode *dvp, stru error = tmpfs_alloc_node(tmp, vap->va_type, cnp->cn_cred->cr_uid, dnode->tn_gid, vap->va_mode, parent, target, vap->va_rdev, &node); if (error != 0) - goto out; + return (error); /* Allocate a directory entry that points to the new file. */ error = tmpfs_alloc_dirent(tmp, node, cnp->cn_nameptr, cnp->cn_namelen, &de); if (error != 0) { tmpfs_free_node(tmp, node); - goto out; + return (error); } /* Allocate a vnode for the new file. */ @@ -705,7 +704,7 @@ tmpfs_alloc_file(struct vnode *dvp, stru if (error != 0) { tmpfs_free_dirent(tmp, de); tmpfs_free_node(tmp, node); - goto out; + return (error); } /* Now that all required items are allocated, we can proceed to @@ -714,10 +713,7 @@ tmpfs_alloc_file(struct vnode *dvp, stru if (cnp->cn_flags & ISWHITEOUT) tmpfs_dir_whiteout_remove(dvp, cnp); tmpfs_dir_attach(dvp, de); - -out: - - return error; + return (0); } static struct tmpfs_dirent *