Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp469363rdb; Thu, 8 Feb 2024 10:57:02 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUAjFOix6K/qGdaF5ziy2pcFuQSXnn54zImLddwJDaT993+LlGYxx6Zs7bW/07tF9lH2V7JIMnW1QhRCrlh2kmRufzrlb3pdmvYAI+qcA== X-Google-Smtp-Source: AGHT+IFWwSBpUPXoVtdM3SvfE13WdCCGZnwgaYZtzIs2vMkkSd4FxIaqRG2PEdqTQ2CY114PrmTY X-Received: by 2002:aca:280c:0:b0:3bf:d9fb:4d7d with SMTP id 12-20020aca280c000000b003bfd9fb4d7dmr177751oix.19.1707418621955; Thu, 08 Feb 2024 10:57:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707418621; cv=pass; d=google.com; s=arc-20160816; b=a8Gs9WJlSOXX2wW1mu2FbxBOxagzF96x6LmjslV1UDNE+587JDnd53FEIliSEt3IPD UnESRHD2DhRgHRgMwBiznpaJwk5sffj3a7CLUnwblIC9yjZfUu3NiFpuAwDaGl/gg+3M XiwE1a1KFZE/AwWrdAgInCd83lbJ0/8AEaCyH2typDQUtXv5UNC/qf/LHVQo3Y2mBTSh VD9MVfyDTaIzcGWG8Ys7pPtw8Y3bsl+cPYoGULnUbtdqzusFE/AmhhmhvZQ6F/5ik8s4 OKW3+SHGtxsSZjKuCd6+NvFC95lbwu6+mpTWLiHAafdQ0jka9XwT8UeZ0UdL3ljhEVOP JKuA== 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=xM0d+XsorFYrCo5Nu22UvJUl+fACbWN4bHR5rl7FgoA=; b=UESRKVW0IbBo1IwA682N2aDzbgdD/lkd6OH8lly0cuW7SDEUCuhVsKAy/Mqsl4kC8w IpPbX3abBaEiwRRfCsDYYuPw4J/WXVQWj/CDeaXa29QTIe9IHsLNL4vFwvmV7ynv90mq K0ZWvx0eWzR/PP89kz1dcVV+hUwnEJJYaTHtE8LTuXWSttOpNE6lQlIBKvQNAxKQZ6oh +a9r7cJy6evaKpj3DPuKv8JTeJzZzKd21uWk0JDr6tZesx1g9Sdcym43doX6zSBO2xN5 LHJ7CJwW6+RX2tSe8ulA70WaMV6hU7rE4V2B1A1VYJryPvDbgy0+ebep+KGSnFhuV8k4 adSg==; 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-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58578-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com X-Forwarded-Encrypted: i=2; AJvYcCXHpudvwpSJIOYrwsqf1jrfza4dOG2OrDEcVD3Fnx7mlu+PrkGh9UbAp3ekdbaQsQAwOWrCbke+PJvHiZJGRB239WTHI3NLCIZr+Q7qqg== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id o12-20020a05622a008c00b0042c31c39522si57312qtw.671.2024.02.08.10.57.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 10:57:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-58578-linux.lists.archive=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-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58578-linux.lists.archive=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 0DD0B1C29CBA for ; Thu, 8 Feb 2024 18:55:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C54FC4C62B; Thu, 8 Feb 2024 18:49:42 +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 Content-Transfer-Encoding: 8bit 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; } -- 2.39.2