From patchwork Fri Jan 26 13:28: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: 13532574 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 D2096C47422 for ; Fri, 26 Jan 2024 13:30:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 625DD6B007B; Fri, 26 Jan 2024 08:30:05 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5ADE56B0080; Fri, 26 Jan 2024 08:30:05 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 474A16B0082; Fri, 26 Jan 2024 08:30:05 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 39BD86B007B for ; Fri, 26 Jan 2024 08:30:05 -0500 (EST) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 0D28040F48 for ; Fri, 26 Jan 2024 13:30:05 +0000 (UTC) X-FDA: 81721545570.13.5255BD8 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf18.hostedemail.com (Postfix) with ESMTP id 66E6E1C001B for ; Fri, 26 Jan 2024 13:30:03 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=AW558L4X; spf=none (imf18.hostedemail.com: domain of BATV+8230b42af99c397292d7+7460+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+8230b42af99c397292d7+7460+infradead.org+hch@bombadil.srs.infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1706275803; 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=R8zVjmjJlygg/UIzAtSyoyUIowDkQKdhzSQrPXzSPFpT3fd3U0AMaZZrYJ/nTrSOFNjHE0 xfjK92uy/zjLJBfN9VqU3VBpC4YQBS9CThuTPK0IUEOUIFHuEmw7XSzsNaDEJqcqxvjQdW Qt++4eGGvJgfsK/x0zJ3YQECHytOPLc= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706275803; a=rsa-sha256; cv=none; b=YEVJQaquGUmAokbfJhBDQbAHuF5GWTGiRpM20g3R3tTBJiX6GVNSPREyFdF3O8qnUvWIds 5Ckoa+Feu9kHEezzL1/ffuv8KrxXojBiFvtGMsbZvvH7GKn7clyGXEw9OCp1tYcGwloMCa DoKhMWZc7s0I21YGh3K07oJkd1OaJqY= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=AW558L4X; spf=none (imf18.hostedemail.com: domain of BATV+8230b42af99c397292d7+7460+infradead.org+hch@bombadil.srs.infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=BATV+8230b42af99c397292d7+7460+infradead.org+hch@bombadil.srs.infradead.org; dmarc=none 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=AW558L4XK6tfao0hRtcKkesnKc 1+cmXOPvdPSPSsWcDFZDhVYrJ4UbLVK+R1/TdWjTp3uU4x3N+G+ltc0EhC6Gq7wICZl1Z1QeKgGn1 hj5vj/hQDdaD3WpT3CZl1U1au1iLqG8Y/g2jdB94h8SA9nrTRRWAzFgii9GNfFm9rAYA0kuNG6bZN Lpm1NgKVP0N6twIVeBtYP4xvgUyFTWP0VNSM6SEKKRl2MIObXbgMZmhoPm+twLDxH3wzjXlyWwWL3 vkbkkSKgvbnZtLm7wQeXpfFSsH0YQFA/OLb3cNDWViJSDSMeE/IZG4mYYaVNTjohdHkKxuSydMRYl l7daPa9Q==; Received: from 2a02-8389-2341-5b80-39d3-4735-9a3c-88d8.cable.dynamic.v6.surfer.at ([2a02:8389:2341:5b80:39d3:4735:9a3c:88d8] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTMHI-00000004Cnt-3lRH; Fri, 26 Jan 2024 13:30:00 +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/21] xfs: shmem_file_setup can't return NULL Date: Fri, 26 Jan 2024 14:28:53 +0100 Message-Id: <20240126132903.2700077-12-hch@lst.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240126132903.2700077-1-hch@lst.de> References: <20240126132903.2700077-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-Stat-Signature: fp89q1ztm9hru4d1fgpsifufu4fh1iwd X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 66E6E1C001B X-Rspam-User: X-HE-Tag: 1706275803-713883 X-HE-Meta: U2FsdGVkX18U4gjxt9HxPKk9rCk6gZ5BNyFtmgH3rxJHIKvLe/nkhLlNlDPzrsS84WKg9ffc5MbcVAzBP9+r2k0CUPgMMX4bX5lTKplWkyb92MbIHiU7icb1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RE0TIC/jmTC2TFzC7ZTQTXFz5+DgwOtogwXAcCpg8F9Uian77h1ME+Cu/KCHTCnbs3VnqLoL+sq1ErnqcfiNRw5kD6gG1qMRXcA9GnFDt0eafnUtTg5L/IDX/6Evx1UxL0xwqziuH7GTh740MdhjitXOgGRyxUvEj7MeLyY1J1yo2BtHqzkQPLCyqDASO5tqAXdkXaKoXGt8nQj7VpdHlo7PtLsaG9Xvi/S0Bb0/WPQKvbGbSWK1nX8PAElq4X8lDGOu12Rc3+8vgF1Ljom9PCAxAymV6aC9dJ9Ry0VFP1aDqvJS+Kg3WO3eNPKY0= 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;