From patchwork Mon Jan 29 14:34:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 13535769 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9112BC47DB3 for ; Mon, 29 Jan 2024 14:35:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 25FD46B0075; Mon, 29 Jan 2024 09:35:50 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1C03C6B00AE; Mon, 29 Jan 2024 09:35:50 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 03AC96B00B1; Mon, 29 Jan 2024 09:35:49 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id E01626B00AE for ; Mon, 29 Jan 2024 09:35:49 -0500 (EST) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 8C7A1A0667 for ; Mon, 29 Jan 2024 14:35:49 +0000 (UTC) X-FDA: 81732597618.10.9B4A2F6 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf13.hostedemail.com (Postfix) with ESMTP id C71DC2001F for ; Mon, 29 Jan 2024 14:35:47 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=L3wYExFQ; dmarc=none; spf=none (imf13.hostedemail.com: domain of BATV+95c35c30fd22f84c25d9+7463+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+95c35c30fd22f84c25d9+7463+infradead.org+hch@bombadil.srs.infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1706538947; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Qe83DfTex1z7zqi4GxksjarNQRXeRN9ZyszbsgkFHtk=; b=kkZ4P7bJWJuyBwZYoEjt8alccfjCY+2qPR4dGAqVCZy1/ybAD6W8f5eTgHtEQ5ytzNxw3p 9keEXHweQPP4IlQVqRtVG35RFEtdJKOOyac+AkjITa7ISnk/qklHLwaxPNBnQMhKfJOwKl BGA1JqiaxwZGvdETZFxFep1F6H7r04Q= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=L3wYExFQ; dmarc=none; spf=none (imf13.hostedemail.com: domain of BATV+95c35c30fd22f84c25d9+7463+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+95c35c30fd22f84c25d9+7463+infradead.org+hch@bombadil.srs.infradead.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706538947; a=rsa-sha256; cv=none; b=YWKB+Rj1YKwfosymeUx2cSYwayqmH2oCgbd14iE4tNJZITRefY5X2N1LJAUHOFUVzGym3S CVXHAIc/vr7EFBpwYLODI8MKNDZlF5JsuzrXqLvJX1F4BkvecmY2x6xqf5KBlbTD9tIEaP HtBYONI3eYWHvDlJ+ZVDG3H7XhOkcXc= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=Qe83DfTex1z7zqi4GxksjarNQRXeRN9ZyszbsgkFHtk=; b=L3wYExFQC0UvuaWRe1nYere+D3 T0e/ZF+LMHE1lHOttUK8WdQM2kpKei3OFZNmrMIMSa3S9Y2hVRvLta/6vsXwyVahp/L4VnqNYQDxU 6cUXOBLNN3pxSWmxRVOTXtv/Wj5LVjrmrdH71qt+RPJr0088CIR/EBbAiTFUcXRYQnt8R5x9Xe3+L JzQze5Mdqk7zFbrd5/bF74xd6Z8ERDHehQ5LbYP7Bq0bOMugqbt2nAVAjB72vjYVHq+pDENuWtZvs oD29U1cbmj6+mIKmn9LN+B1/2APGXvFBLeha0QKdPmJ2791TDKtERQ55WTjvHcWB2REM/2vZ8eQFn tu8LAvCw==; Received: from [2001:4bb8:182:6550:c70:4a89:bc61:3] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.97.1 #2 (Red Hat Linux)) id 1rUSjh-0000000D6KF-0TQt; Mon, 29 Jan 2024 14:35:45 +0000 From: Christoph Hellwig To: Chandan Babu R , "Darrick J. Wong" , Hugh Dickins , Andrew Morton Cc: linux-xfs@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 11/20] xfs: shmem_file_setup can't return NULL Date: Mon, 29 Jan 2024 15:34:53 +0100 Message-Id: <20240129143502.189370-12-hch@lst.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240129143502.189370-1-hch@lst.de> References: <20240129143502.189370-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: C71DC2001F X-Stat-Signature: ha3tt9d5qjmoymkdem8hiupqg7ooiona X-Rspam-User: X-HE-Tag: 1706538947-247873 X-HE-Meta: U2FsdGVkX1/DHPl39tSltAS/i2au9B2VFhioehXAAIV85GyMTdaFgvXOO/enOwqO505FUM41xFCOxeM3IczqTiPCqCVblqn2MG4aL8FQDr7hpPjQXDo0R6jHxhdZ5hkHCJI4DfNlOqLDlsGa9HVskPBLO3BRJPHavAyAi4HASC9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4oBFpnJX65No8XBD2v9jYpEI71fKT5E7XzDGmiUKQQNMV/rSdV8L4ChVVcPVABbdhvSWV8IOfN/1X+aPP8VEiaSze+mrdN5JVltALwQG9HEk6e5pXUVioiqHgesgBqpBKjRinATShrWHnCmwpLKjvpur7DjeJVhOvwz4mHSFo2A/AdrdS8btSSMInHFXnuTuq8o7s+nT9GymxxaledKNvI68bLmgn7tx+Cc06bf6vwbr5I0CeZmgm12oy0hkQm4h/ILtCkw= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: shmem_file_setup always returns a struct file pointer or an ERR_PTR, so remove the code to check for a NULL return. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong --- fs/xfs/scrub/xfile.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fs/xfs/scrub/xfile.c b/fs/xfs/scrub/xfile.c index 71c4102f3305fe..7785afacf21809 100644 --- a/fs/xfs/scrub/xfile.c +++ b/fs/xfs/scrub/xfile.c @@ -62,15 +62,13 @@ xfile_create( { struct inode *inode; struct xfile *xf; - int error = -ENOMEM; + int error; xf = kmalloc(sizeof(struct xfile), XCHK_GFP_FLAGS); if (!xf) return -ENOMEM; xf->file = shmem_file_setup(description, isize, 0); - if (!xf->file) - goto out_xfile; if (IS_ERR(xf->file)) { error = PTR_ERR(xf->file); goto out_xfile;