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: 13550330 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 F38F8C48260 for ; Thu, 8 Feb 2024 18:49:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 893996B0095; Thu, 8 Feb 2024 13:49:30 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 81C886B0096; Thu, 8 Feb 2024 13:49:30 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 648E46B0099; Thu, 8 Feb 2024 13:49:30 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 384B96B0096 for ; Thu, 8 Feb 2024 13:49:30 -0500 (EST) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 108A9C0F5A for ; Thu, 8 Feb 2024 18:49:30 +0000 (UTC) X-FDA: 81769524900.22.AC0D74D Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) by imf27.hostedemail.com (Postfix) with ESMTP id 7928B40009 for ; Thu, 8 Feb 2024 18:49:28 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=efficios.com header.s=smtpout1 header.b=FUBQbuoc; spf=pass (imf27.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=1707418168; 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=Uc6BPltxYyrCKLeBe91M11Aut1TTb636VD8sK2E51sM1rF/fXQPi4tSCWHCpLB3DwvnzIk NLrqzj2q7Ep6Wkv7Rrn2jIiqVLpj6qSHkrh3zFomN3tosI64XpLbgE/WewJ/DaES2BnKqo Ju0c81Ov/sxVFeTc73TX59FboGXw8C8= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1707418168; a=rsa-sha256; cv=none; b=D2edz+TqzPIUWdUhLgY175pYdycEf44AJ+qiTjgHTL+6Lz1DUGslcMuOWiW8jnkW0cpmi5 lrnhggO0kDTfEoN+XmmSo+oThRjwMgTnKlByaKCcFEbm30UuXXycfoAHMEFZ+2SWEgGW0J /IoPQW2V4AnA1qJ7vsjkWxAVN4OvRos= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=efficios.com header.s=smtpout1 header.b=FUBQbuoc; spf=pass (imf27.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=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> MIME-Version: 1.0 X-Stat-Signature: 69xnapck9azk4pextw3g6fpd1rbp45ch X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 7928B40009 X-Rspam-User: X-HE-Tag: 1707418168-72904 X-HE-Meta: U2FsdGVkX1+O8Q6IeJrvrOqOui3lxJ3L7fxUJ6vbjdRCfsDKtJVGmHQ3L6UwfFtGhOjWI/b/J9iq/6BxMPUtEbFsqn5KOAJR2SZsJtYTDL2lm6wLMvcaeOkY4mGcYzZX7EMm7c2CsTFfvh6gk0RuPOiSuIQFxP2OJt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33dBNhliIbL7su5YBtejqqkeFSLy7a7bZgIOh+ryK7+wq8WUA8uvLErJnRak6ozbWXV4ND+K6N4nBbO0onZNEDALGf9OeAxxm2zW1pCZxlT2bMvWkcoBQYDzagnfT6RsBukHCSa8DpOD+VevjgnhB98e13X+1eJuN9dj5569LamkRL3Dq7+U/LQDtf+N5f407tjXXHrXuK75BtTdzJOCGTXVfO1qFuDbZ0nEix/Elq/BXgCdcSfysO3CA1YFYLMy6SY6q7sCjGujeb82D+NNutjLCuixdjMBD51bnJlxy/SooLObGf22jGM8olbDd1hVzgoXq4s/JHR133jD8oKdSRoJ53HJfn+40q8pYFl6GgIsXTFvTr3pwGm5lJGjuJV3EbBIFRL97rhe6/NrM= 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; }