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: 196032 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:9bc1:b0:106:209c:c626 with SMTP id op1csp699762dyc; Fri, 2 Feb 2024 13:08:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IFqUxSNzWhawghi8mUaxBEvLQsJg7ucMyPU8HdBrdte5tYV8c5EE9NwQtAGhBvokdYeYtTW X-Received: by 2002:a05:622a:341:b0:42b:ff30:3645 with SMTP id r1-20020a05622a034100b0042bff303645mr519187qtw.21.1706908090645; Fri, 02 Feb 2024 13:08:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706908090; cv=pass; d=google.com; s=arc-20160816; b=VAmzPWEV/6T+Mwlt0/Og78ciful5PMaQkoBVXpf4dM9wcBLF28csb4JfyKCtgfQG+L lH67IolLQIymHoxSSlRpecADGu7uWOWeshamEr4yWillYekRekFFOzSNLQpCFc+oBi8m y0alH7TmxqvGvdZedkPuBhUAwt8Fbl5Ur8wkhNKma4iAeDxSfv3pIvxvStDp8nvAh3jN B1WpMlvhiM4pAEay793Q/OFLOjx4/JtJTjHUPXvGw5yxc57KFG9zu2xxi580QvAWr1pB DN18s/W/82H65Z2XGrrhspcsBZ0jlAco3So8k4oLOaTn5tBNnhlG2RX28BRMPfQVv+t0 MpPg== 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=ean/R9TNNUV2b35igaNqWm3UTXoL1LfeDhEh75gIgJ4=; b=x+Apsp2srmuT2UudHEGmOR+9zeqY+3p9+681wT8mWWVHCvzn3ucCB/hE4B+P6HYgjS W9inxPH3/aNIl44XKoH7SDa5SAsDUeEKwpIlDthsUydoV+zZwMlx3EcKJOBn48knz4y5 aCJFAzjvQm7GURqR1UZQisyuxrNqTirioMYDKo8cbKt/A+qxaen7MqXK0QJiW/zaE20S mSCvp44K/lz4FP9p4cbBsDea9N8WQUO9d89eo1nCkLffXxKEwcAXn2oN5GkVblII9uuV S0eGnRol2pnip2y4S22Ib/LawpX9RAQ+LS1LqOF4CsoZ4UDk4kP3tBXKigIqD70GMHO8 CFTA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=lqFXIBkP; 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-50584-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50584-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com X-Forwarded-Encrypted: i=1; AJvYcCUjC40h1Cz4ZM9j7jV4hF4uxY6w96wUiLXwEIQr2NI7Q1eRDK0XQRqOrsoEUR6eLQPrFouD0YWJjtec9IIG1t7Xuj5jMg== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id u14-20020a05622a14ce00b0042c0b9e0fc6si701784qtx.456.2024.02.02.13.08.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 13:08:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-50584-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=lqFXIBkP; 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-50584-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-50584-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 70B231C22EB4 for ; Fri, 2 Feb 2024 21:08:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9B72213B285; Fri, 2 Feb 2024 21:00:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=efficios.com header.i=@efficios.com header.b="lqFXIBkP" 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 1907D1308CC; Fri, 2 Feb 2024 21:00:33 +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=1706907635; cv=none; b=NsPJEBvajfJSsWoS/zKrwsZOqpF0ZZJ04e3IiydeEY5VvEpPDZO6JZPphXPLv+EyP2D4RJIHutnAh15b73xoyd8p0wdjbGjCNh1RWtL37fvQ3hwPE2iu+eBB3jDtLDsnWei/HAyytpvBzh9l2MxZ60gxDVpPPpj9DgavYyIK77w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706907635; c=relaxed/simple; bh=umcqlnyoni1L+YV9DQVqbsmdwpCSWY7IqX3VvZk7A10=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=rbOtM6ATpw0iehzxJqnTKaGAIRqt6S89WEf/YoQ486IYxeiQ4v4PMdeBQinTO6IiTSNw6bu26J9sP+98a8Crkb1/Uk8EesEkTweG3GsL0SrCYqRYWfy4UItvyBChorVhrNNsUV2J/nD1+VjjGuHLkKmsVVC3NHWM33e0YXZj9Y0= 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=lqFXIBkP; 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=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> 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: 1789822858005549632 X-GMAIL-MSGID: 1789822858005549632 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; }