From patchwork Thu Feb 8 18:49:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Desnoyers X-Patchwork-Id: 198534 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp383859dyd; Thu, 8 Feb 2024 10:58:34 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXyHUgEiWyozpS/aglo4t/hj5mj37WtEFSxaFDCL5cruqeFN4xKcvNjiL+otBiOOklBAa9WhAEMPPeAmwdGUtWLnf6AQg== X-Google-Smtp-Source: AGHT+IFRGLjxwwDRnT/pG/fAXj8Dg/IVeRaluM8D4g7CTsMczpheqKWhxPGi2bAJ5hjaZ1urFopC X-Received: by 2002:a05:620a:22a3:b0:785:b064:ba39 with SMTP id p3-20020a05620a22a300b00785b064ba39mr348441qkh.27.1707418714094; Thu, 08 Feb 2024 10:58:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707418714; cv=pass; d=google.com; s=arc-20160816; b=p3cHsvI2jjwI3fN8/DuyDv5GfgJqjb+MuxcKiO+vE1hD99NIVOhGX/HXCtPti2acHx 37pxnAd1SVv3YxQzD83gw/Zveq9SjtSHXZtEkOoD/rOayZxBV5uz8ZYpCQhjO0bKZDdv vYT5yA2+1GoYhqNqRB7883QGqGTzyLVG6oo77DLNrtKIzv1xj2zoDxDDcSXj3eL1X4+O YgWVfGWKfyz0TLlGsDSsTyUvwB+7sCpBIsV4X3OW671fpjuyF9nsikescOScFs6xaLJf NN2PLMsOl5cauFpILZg3SBbFSzorK43/LW6BiLEG5NOyJ4i3meKXjIiMOYIDCx/AxZgQ WEJQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=5aeSBiqeQsH8ed+NrPkel0B0yoku1i9OKo7qCr10U1g=; fh=wREPbk3x+f0bTcF2irdUNdZBGai6KueLTpPzwLSTLOw=; b=T/z9DGz6E2oXezibuKm04YYEotcjEMCUHQBG1WDJ7kJ35306AGFsBoEUPbRlMBdUR5 aed5l+j4369hT1Jcd5FQYcIXHPL4frMaCZUNxkwtFwRhchJyWhGykSh0Jj5quXIvMJut Or1QVVTffAma5XYmzU8kPjcdHZ8BSvRFx86wPiAUnG/jenMNs99PGuZVTRWsNzrAWS0v f/Oji8H41ga8vGGrKYeXqXWvVoP4Y6Mi/rVvigk8Jne9M1B6CSHWT9zWcFb/JmxvlkfQ 4B9ENVTxRa5iBxZn48Bo+BIgqUxNV1yemZOcSUf2eob6a4PWmIW7IhTyLTsQoihPdesf SoWw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=FUBQbuoc; arc=pass (i=1 spf=pass spfdomain=efficios.com dkim=pass dkdomain=efficios.com dmarc=pass fromdomain=efficios.com); spf=pass (google.com: domain of linux-kernel+bounces-58578-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58578-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com X-Forwarded-Encrypted: i=2; AJvYcCVfY3kUSirq5IGs6ys2z+JEN8g8ugj3N0wGk/o/gC83an+VYJfjzeSgeJrN3kXp3RZSX+qYrrUirLLwPGyGt1jBMYXmOQ== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id pe16-20020a05620a851000b007859699241asi190661qkn.539.2024.02.08.10.58.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 10:58:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-58578-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=FUBQbuoc; arc=pass (i=1 spf=pass spfdomain=efficios.com dkim=pass dkdomain=efficios.com dmarc=pass fromdomain=efficios.com); spf=pass (google.com: domain of linux-kernel+bounces-58578-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58578-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 5A74C1C2A201 for ; Thu, 8 Feb 2024 18:57:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 930824F8A9; Thu, 8 Feb 2024 18:49:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=efficios.com header.i=@efficios.com header.b="FUBQbuoc" Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 42D1533CDF; Thu, 8 Feb 2024 18:49:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=167.114.26.122 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707418178; cv=none; b=GRIk/fPvkruPvib2YK+z8d5MhcwdKBq0PgU5a9bAmL6njZCEpzEEyrf9Cvs8MQpN2sNtF/WZt8QcsZtGpAlNRh0kyS2gA+5oVfv9bfxyXes/7Iwv12TzXHBHZnvurHFmnsKVyf0UKBTGfDjK+wkqefic3j4BlmVnUQ7CR2eB4j8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707418178; c=relaxed/simple; bh=umcqlnyoni1L+YV9DQVqbsmdwpCSWY7IqX3VvZk7A10=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=MgNU/V++rIxWK+csXzV6vbHuyLoIWyV5dmbOy/8R+SMBUFkZzigCwVBEqaPHcV7gZpYC4zH+3Urbr6AP7oFG88RAPc8NfiJHx3nbyq1SmnHpMofK/kFCSEK2VSXsTmWXm72XpatAf4jZEvimw/CJ/Gb5OLmHCee7XLry5YSSLVI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=efficios.com; spf=pass smtp.mailfrom=efficios.com; dkim=pass (2048-bit key) header.d=efficios.com header.i=@efficios.com header.b=FUBQbuoc; arc=none smtp.client-ip=167.114.26.122 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=efficios.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=efficios.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1707418167; bh=umcqlnyoni1L+YV9DQVqbsmdwpCSWY7IqX3VvZk7A10=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FUBQbuoczWUo8k5+ANycG5EnwK2AZwZz+GM2Uz2zImOXhkBzFtGTdwBZAYCenP6fC DgLffSigWmSC0rW6EM/A/gCcDBjQqYAWbEiusKZCP/jz+pOnSPLQWkJpy21cC8SmOh 7iFVQnDrBxgXCvAMOSe7hVjYTOmI/BykW8ePB+qiKPACpJtReCrtD81c1ldvkSSgXY 169iBhHYQPa5LIPJ3/XYMbbPDKLgg7sPaH9XXE5MMG0A2HDed+b0Hbw+qnFFAYipQh Ks5Sbzoa+ogU/4NEMlev5PchVfLYxH7lv49QChUb5wmbf1476V86H9j9CkdWhoRXIX FqmNBGS/mqM+w== Received: from thinkos.internal.efficios.com (192-222-143-198.qc.cable.ebox.net [192.222.143.198]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4TW5cl4DQpzXwg; Thu, 8 Feb 2024 13:49:27 -0500 (EST) From: Mathieu Desnoyers To: Dan Williams , Arnd Bergmann , Dave Chinner Cc: linux-kernel@vger.kernel.org, Mathieu Desnoyers , Andrew Morton , Linus Torvalds , Vishal Verma , Dave Jiang , Matthew Wilcox , Russell King , linux-arch@vger.kernel.org, linux-cxl@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-xfs@vger.kernel.org, dm-devel@lists.linux.dev, nvdimm@lists.linux.dev, linux-s390@vger.kernel.org, Alasdair Kergon , Mike Snitzer , Mikulas Patocka Subject: [PATCH v4 12/12] virtio: Cleanup alloc_dax() error handling Date: Thu, 8 Feb 2024 13:49:13 -0500 Message-Id: <20240208184913.484340-13-mathieu.desnoyers@efficios.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240208184913.484340-1-mathieu.desnoyers@efficios.com> References: <20240208184913.484340-1-mathieu.desnoyers@efficios.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790358285544965993 X-GMAIL-MSGID: 1790358285544965993 Now that alloc_dax() returns ERR_PTR(-EOPNOTSUPP) rather than NULL, the callers do not have to handle NULL return values anymore. Signed-off-by: Mathieu Desnoyers Cc: Alasdair Kergon Cc: Mike Snitzer Cc: Mikulas Patocka Cc: Andrew Morton Cc: Linus Torvalds Cc: Dan Williams Cc: Vishal Verma Cc: Dave Jiang Cc: Matthew Wilcox Cc: Arnd Bergmann Cc: Russell King Cc: linux-arch@vger.kernel.org Cc: linux-cxl@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org Cc: linux-mm@kvack.org Cc: linux-xfs@vger.kernel.org Cc: dm-devel@lists.linux.dev Cc: nvdimm@lists.linux.dev Cc: linux-s390@vger.kernel.org --- fs/fuse/virtio_fs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c index 621b1bca2d55..a28466c2da71 100644 --- a/fs/fuse/virtio_fs.c +++ b/fs/fuse/virtio_fs.c @@ -809,8 +809,8 @@ static int virtio_fs_setup_dax(struct virtio_device *vdev, struct virtio_fs *fs) return 0; dax_dev = alloc_dax(fs, &virtio_fs_dax_ops); - if (IS_ERR_OR_NULL(dax_dev)) { - int rc = IS_ERR(dax_dev) ? PTR_ERR(dax_dev) : -EOPNOTSUPP; + if (IS_ERR(dax_dev)) { + int rc = PTR_ERR(dax_dev); return rc == -EOPNOTSUPP ? 0 : rc; }