From patchwork Fri Feb 2 21:00:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Desnoyers X-Patchwork-Id: 13543410 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 0F34FC4828F for ; Fri, 2 Feb 2024 21:01:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B92C36B009A; Fri, 2 Feb 2024 16:00:34 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id AED0C6B009B; Fri, 2 Feb 2024 16:00:34 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9DB856B009C; Fri, 2 Feb 2024 16:00:34 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 83A716B009A for ; Fri, 2 Feb 2024 16:00:34 -0500 (EST) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 561B9120F4C for ; Fri, 2 Feb 2024 21:00:34 +0000 (UTC) X-FDA: 81748082388.18.51FFAC8 Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) by imf18.hostedemail.com (Postfix) with ESMTP id AF0C41C0025 for ; Fri, 2 Feb 2024 21:00:32 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=efficios.com header.s=smtpout1 header.b=lqFXIBkP; spf=pass (imf18.hostedemail.com: domain of mathieu.desnoyers@efficios.com designates 167.114.26.122 as permitted sender) smtp.mailfrom=mathieu.desnoyers@efficios.com; dmarc=pass (policy=none) header.from=efficios.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1706907632; 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=5aeSBiqeQsH8ed+NrPkel0B0yoku1i9OKo7qCr10U1g=; b=53C5W74CpINhAFJmCZar0nsJgO6KdUVYbwdREhDGPtSIJu/t/jtv4EgeCNVw0NyLR1ogN0 koTPIfoRxZtxcl5fxCwXmpcj1QN4Ej7CFVBFr5XSfg2ByHr/OvAxY2vqKnh8CNsp0/cvsN 1IRY3V8isRXJtC2UZ2nCIuaeXoQnqXs= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706907632; a=rsa-sha256; cv=none; b=o+bTA2o0+yIxwNL4qQaGN6nXiS1mQTC3YGYukcpyYYsE6RoD5p6a55hTfDsKJmVDWvdWSm TYkTVFVY3VgtdE4tNgRlZI5iVtD4nqiJ9Xds26P+wfyBR7rvUzlczliYqwQXfYd/uaABoq HjnSooQ6bRftYT6D+NUvMwBqU+UUK2M= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=efficios.com header.s=smtpout1 header.b=lqFXIBkP; spf=pass (imf18.hostedemail.com: domain of mathieu.desnoyers@efficios.com designates 167.114.26.122 as permitted sender) smtp.mailfrom=mathieu.desnoyers@efficios.com; dmarc=pass (policy=none) header.from=efficios.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1706907632; bh=umcqlnyoni1L+YV9DQVqbsmdwpCSWY7IqX3VvZk7A10=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lqFXIBkPDeZLU45mjUmnm0q3K473FzSvhK0mnrXvhigDtwWMPffN/nvDG+HjmLhap XrVKFSp8liCgJWM5Eg0tCRrj2fhEw2prPWKm1ioqpCgipg1igi1SaDbnkeKOm6XGCA 5TNwnhRSJ8qxzVcg2hGw3+/ggGMs07Oerum0TU9KO61RsOC0dkF05xsu1dTLTBbqhh N/kWbUj5cfkrNfMI6UKWA0tHM87k+2eksxppdkVd2mkAhQ8jBpJZZiG1ADrMpVpvQM jagnOvFu4AVyj7SZMGqU2NuRYa7LnjHCXrByox5plK8AOgTnfOaP/F8tHh2RJd0ft0 pwO0PxPGfxN1Q== 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 4TRSpl58jJzX2N; Fri, 2 Feb 2024 16:00:31 -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: [RFC PATCH v4 12/12] virtio: Cleanup alloc_dax() error handling Date: Fri, 2 Feb 2024 16:00:19 -0500 Message-Id: <20240202210019.88022-13-mathieu.desnoyers@efficios.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240202210019.88022-1-mathieu.desnoyers@efficios.com> References: <20240202210019.88022-1-mathieu.desnoyers@efficios.com> MIME-Version: 1.0 X-Stat-Signature: t4d6ja9ryoyexrarrrkpnnkkf49bptnb X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: AF0C41C0025 X-Rspam-User: X-HE-Tag: 1706907632-61618 X-HE-Meta: U2FsdGVkX1/1e0rM+bLVSSuBqz92g6o9v70kbR50t0JnZdqQltjsq+git4ZwKo4gXMS9VGS1ov4QSrCPOt3MeQoN/UBLvdeVlKdzMgTQDmFbNYhd4eCP/iB/IsWPeayF47t4Nwitc4hPWNml7s69Zc58LEsY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0IESn8M97Jw+yiELN+ItgYoJe3garkMRifGVfUsji05WhGuk+9txa2mNUcvx6VRg9OZaG6BFJggbeBdFRanUFUeS3RnSzKwxBectOpISOibg+h9rgaKKECVsHzhZF/v5dlRGUErmshLe4OzVZBqlV3OM3FLdpTdIMaRrVtwR8ichRtQaWOvlXfq8zL0vly4Py/BUxHPowjtdTEbZ66lAMMoHqoc09hfdOkFokzmlZvi+Y/V2SRe+mGN/HqPeQYE0lXziQXli0F2z3WrkDW7TUR4dQ+Pu6PsT03mEHeKcXxaaXv1412ZT9uC4QyAwAD8d39fj/TljLUl1UASDzO1f9w7uG6x04SIx1/gMdHQtBQFQH6JyNGpvDq732U7+8wuf+2yAA= 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: 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; }