From owner-svn-src-all@freebsd.org Mon Jul 27 14:14:08 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 30AC6363C56; Mon, 27 Jul 2020 14:14:08 +0000 (UTC) (envelope-from markj@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 4BFhcw0cfXz3Xlf; Mon, 27 Jul 2020 14:14:08 +0000 (UTC) (envelope-from markj@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 EC9171F130; Mon, 27 Jul 2020 14:14:07 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06REE7J9069190; Mon, 27 Jul 2020 14:14:07 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06REE6Ec069185; Mon, 27 Jul 2020 14:14:06 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202007271414.06REE6Ec069185@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 27 Jul 2020 14:14:06 +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: r363604 - stable/12/sys/fs/ext2fs X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/fs/ext2fs X-SVN-Commit-Revision: 363604 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: Mon, 27 Jul 2020 14:14:08 -0000 Author: markj Date: Mon Jul 27 14:14:06 2020 New Revision: 363604 URL: https://svnweb.freebsd.org/changeset/base/363604 Log: MFC r363367: ext2fs: Stop checking for failures from malloc(M_WAITOK). PR: 240545 Modified: stable/12/sys/fs/ext2fs/ext2_acl.c stable/12/sys/fs/ext2fs/ext2_alloc.c stable/12/sys/fs/ext2fs/ext2_extents.c stable/12/sys/fs/ext2fs/ext2_lookup.c stable/12/sys/fs/ext2fs/ext2_vnops.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/fs/ext2fs/ext2_acl.c ============================================================================== --- stable/12/sys/fs/ext2fs/ext2_acl.c Mon Jul 27 14:11:08 2020 (r363603) +++ stable/12/sys/fs/ext2fs/ext2_acl.c Mon Jul 27 14:14:06 2020 (r363604) @@ -234,8 +234,6 @@ ext2_getacl_posix1e(struct vop_getacl_args *ap) len = sizeof(*ap->a_aclp) + sizeof(struct ext2_acl_header); value = malloc(len, M_ACL, M_WAITOK); - if (!value) - return (ENOMEM); error = vn_extattr_get(ap->a_vp, IO_NODELOCKED, attrnamespace, attrname, &len, value, ap->a_td); Modified: stable/12/sys/fs/ext2fs/ext2_alloc.c ============================================================================== --- stable/12/sys/fs/ext2fs/ext2_alloc.c Mon Jul 27 14:11:08 2020 (r363603) +++ stable/12/sys/fs/ext2fs/ext2_alloc.c Mon Jul 27 14:14:06 2020 (r363604) @@ -424,9 +424,6 @@ ext2_valloc(struct vnode *pvp, int mode, struct ucred } ip = malloc(sizeof(struct inode), M_EXT2NODE, M_WAITOK | M_ZERO); - if (ip == NULL) { - return (ENOMEM); - } /* Allocate a new vnode/inode. */ if ((error = getnewvnode("ext2fs", ump->um_mountp, &ext2_vnodeops, &vp)) != 0) { Modified: stable/12/sys/fs/ext2fs/ext2_extents.c ============================================================================== --- stable/12/sys/fs/ext2fs/ext2_extents.c Mon Jul 27 14:11:08 2020 (r363603) +++ stable/12/sys/fs/ext2fs/ext2_extents.c Mon Jul 27 14:14:06 2020 (r363604) @@ -319,9 +319,6 @@ ext4_ext_fill_path_bdata(struct ext4_extent_path *path ("ext4_ext_fill_path_bdata: bad ep_data")); path->ep_data = malloc(bp->b_bufsize, M_EXT2EXTENTS, M_WAITOK); - if (!path->ep_data) - return (ENOMEM); - memcpy(path->ep_data, bp->b_data, bp->b_bufsize); path->ep_blk = blk; @@ -394,9 +391,6 @@ ext4_ext_find_extent(struct inode *ip, daddr_t block, path = malloc(EXT4_EXT_DEPTH_MAX * sizeof(struct ext4_extent_path), M_EXT2EXTENTS, M_WAITOK | M_ZERO); - if (!path) - return (ENOMEM); - *ppath = path; alloc = 1; } @@ -758,8 +752,6 @@ ext4_ext_split(struct inode *ip, struct ext4_extent_pa /* Allocate new blocks. */ ablks = malloc(sizeof(e4fs_daddr_t) * depth, M_EXT2EXTENTS, M_WAITOK | M_ZERO); - if (!ablks) - return (ENOMEM); for (a = 0; a < depth - at; a++) { newblk = ext4_ext_alloc_meta(ip); if (newblk == 0) @@ -1510,9 +1502,6 @@ ext4_ext_remove_space(struct inode *ip, off_t length, path = malloc(sizeof(struct ext4_extent_path) * (depth + 1), M_EXT2EXTENTS, M_WAITOK | M_ZERO); - if (!path) - return (ENOMEM); - path[0].ep_header = ehp; path[0].ep_depth = depth; i = 0; Modified: stable/12/sys/fs/ext2fs/ext2_lookup.c ============================================================================== --- stable/12/sys/fs/ext2fs/ext2_lookup.c Mon Jul 27 14:11:08 2020 (r363603) +++ stable/12/sys/fs/ext2fs/ext2_lookup.c Mon Jul 27 14:14:06 2020 (r363604) @@ -891,10 +891,6 @@ ext2_add_first_entry(struct vnode *dvp, struct ext2fs_ EXT2F_ROCOMPAT_METADATA_CKSUM)) { entry->e2d_reclen = dirblksize - sizeof(struct ext2fs_direct_tail); buf = malloc(dirblksize, M_TEMP, M_WAITOK); - if (!buf) { - error = ENOMEM; - goto out; - } memcpy(buf, entry, EXT2_DIR_REC_LEN(entry->e2d_namlen)); ext2_init_dirent_tail(EXT2_DIRENT_TAIL(buf, dirblksize)); ext2_dirent_csum_set(dp, (struct ext2fs_direct_2 *)buf); Modified: stable/12/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- stable/12/sys/fs/ext2fs/ext2_vnops.c Mon Jul 27 14:11:08 2020 (r363603) +++ stable/12/sys/fs/ext2fs/ext2_vnops.c Mon Jul 27 14:14:06 2020 (r363604) @@ -1075,10 +1075,6 @@ abortit: ext2_dec_nlink(dp); dp->i_flag |= IN_CHANGE; dirbuf = malloc(dp->i_e2fs->e2fs_bsize, M_TEMP, M_WAITOK | M_ZERO); - if (!dirbuf) { - error = ENOMEM; - goto bad; - } error = vn_rdwr(UIO_READ, fvp, (caddr_t)dirbuf, ip->i_e2fs->e2fs_bsize, (off_t)0, UIO_SYSSPACE, IO_NODELOCKED | IO_NOMACCHECK, @@ -1388,12 +1384,6 @@ ext2_mkdir(struct vop_mkdir_args *ap) #define DIRBLKSIZ VTOI(dvp)->i_e2fs->e2fs_bsize dirtemplate.dotdot_reclen = DIRBLKSIZ - 12; buf = malloc(DIRBLKSIZ, M_TEMP, M_WAITOK | M_ZERO); - if (!buf) { - error = ENOMEM; - ext2_dec_nlink(dp); - dp->i_flag |= IN_CHANGE; - goto bad; - } if (EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT2F_ROCOMPAT_METADATA_CKSUM)) { dirtemplate.dotdot_reclen -= sizeof(struct ext2fs_direct_tail); ext2_init_dirent_tail(EXT2_DIRENT_TAIL(buf, DIRBLKSIZ));