Message ID | 20240202210019.88022-11-mathieu.desnoyers@efficios.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 A2174C4828F for <linux-mm@archiver.kernel.org>; Fri, 2 Feb 2024 21:00:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 216CA6B0099; Fri, 2 Feb 2024 16:00:34 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 19F786B009A; 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 017786B009B; Fri, 2 Feb 2024 16:00:33 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id E34756B0099 for <linux-mm@kvack.org>; Fri, 2 Feb 2024 16:00:33 -0500 (EST) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 8C2571A1056 for <linux-mm@kvack.org>; Fri, 2 Feb 2024 21:00:33 +0000 (UTC) X-FDA: 81748082346.27.E8D8A74 Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) by imf05.hostedemail.com (Postfix) with ESMTP id 036CC10002C for <linux-mm@kvack.org>; Fri, 2 Feb 2024 21:00:31 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=efficios.com header.s=smtpout1 header.b=stqve+V0; dmarc=pass (policy=none) header.from=efficios.com; spf=pass (imf05.hostedemail.com: domain of mathieu.desnoyers@efficios.com designates 167.114.26.122 as permitted sender) smtp.mailfrom=mathieu.desnoyers@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=M/l3w5J0gRKX2dpYvmIz6vr4xoT8EtwTyWYFokXaqsQ=; b=yeCYcTi3CZzecsXO+ZUZHmJb0+3NTtXbmseMqXV2eVOjR35ycyXQh3icIFkX+5ze0nTb37 RnlwE2UNQZmJOYcdaElJgJ5w5J/o6S1xq+yND4r/lbwuPux/CJBh5r1p7JI+eFJncp2cUy r/liZmGUd6/wZP+ASE9HwXsRi4Qqq2s= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=efficios.com header.s=smtpout1 header.b=stqve+V0; dmarc=pass (policy=none) header.from=efficios.com; spf=pass (imf05.hostedemail.com: domain of mathieu.desnoyers@efficios.com designates 167.114.26.122 as permitted sender) smtp.mailfrom=mathieu.desnoyers@efficios.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706907632; a=rsa-sha256; cv=none; b=7D9sgUogRjIVGXVF9XAAXaQbZLUlOtIQWg1AGlkTD8eVxXuR3ETDq2ilDJD/AbdC7SDvBS QtuXvkHJ41n4ANvgm3XXYyNEBWlvZJsdqPn5oavQyw4lTjnls/IboN6alZ9nGnraMpw+uS D3GKAmrsf2p9QNM0F1zSTIKNwJiidk4= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1706907631; bh=3qwtk0TzM3yqkpdWTkMn8G1D7Yvm6JJDP82nQNcfpzk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=stqve+V0iP+i7A8cWyEdeR/J0+TFtioEAeqXubDQfNrggDawyuTqMyi7DlnWDbJPW iDOy+p1MQzxotedzOUguk4h94qZrEA0AN7mjmuzZ7X9J6dE3YIgS9yNly8YeiJOzGM aE02qMnnDQ2TWTEIqq0WhcRJylZzNF3EBqhM9xwgiCTZuXtmJxPxi/59mJrN+FJJS9 iMUPk/3CUQifwg8kFZnYAe8PayUfUzpS9yBrCAjw9+zgkOAWJzl1Hsfmh4xylcg2sf DyIb2UVO9CL+zPup7gMxuA3MqBvmsHTIUEuxKr01Euu+/TTDdIo2T9pudSkFGCgQor 3SRQF2RTqGK/Q== 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 4TRSpk6BX1zXBy; Fri, 2 Feb 2024 16:00:30 -0500 (EST) From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> To: Dan Williams <dan.j.williams@intel.com>, Arnd Bergmann <arnd@arndb.de>, Dave Chinner <david@fromorbit.com> Cc: linux-kernel@vger.kernel.org, Mathieu Desnoyers <mathieu.desnoyers@efficios.com>, Andrew Morton <akpm@linux-foundation.org>, Linus Torvalds <torvalds@linux-foundation.org>, Vishal Verma <vishal.l.verma@intel.com>, Dave Jiang <dave.jiang@intel.com>, Matthew Wilcox <willy@infradead.org>, Russell King <linux@armlinux.org.uk>, 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 <agk@redhat.com>, Mike Snitzer <snitzer@kernel.org>, Mikulas Patocka <mpatocka@redhat.com> Subject: [RFC PATCH v4 10/12] dm: Cleanup alloc_dax() error handling Date: Fri, 2 Feb 2024 16:00:17 -0500 Message-Id: <20240202210019.88022-11-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 Content-Transfer-Encoding: 8bit X-Rspam-User: X-Stat-Signature: 6hpbjdzritaod1p4srkft163ana3cfx3 X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Stxf8Vp3yNMtrVX8KYPpHi+5BhFmt6OZx204rM0jOrfo9wL9k+Nh3FdykqCq8NSsjV7nNoVWnDl35tP+tXLn415Jg7Tuul45p+sr5Mpw5O20YrFfNmet5iUFoZvjUOuD3Lvdpl1cpOXR209wHoOpdRXDeFmd6KTmkxugK+g2D/AoNMWp6Nu0KinKnSWZzjp6z022YecRMd7rIv4AP6r3lIwmOucIMZoGJHHqcf2eerR9NZu+SUdf8hwoq2zcfrRRuU9nG/nj8yGroQIAy4jVuw87+dnneBCmQuYpzv6Sdumq6iP+DEfDguQq/+RgJY5o40TFIaBwSeGZDqGfBeKAR+TGP0dkafBecuvXJGEUyE6DpElncKFoPsnmzErbZMDDiHOWoHInskZetO/6pHnsX2VKGbVrDxyk2BjqXEi2jSYKjjnm4WADfmVKVz2P2Af7SEvz1t5blJDdSRGzvEmtp/58qqGDXAU5nM6rTKB5bpdsnhqZ/5f6mPI/NZv4cF+XRSKT/0mnmHPKc4GE+yZUjt5cBJAk5DWoBEswqwWy3UOrXIMJtJMTDPDOFg9PZzOLVeaBxi1yy0nb8R+UXqe06EW+896tiXtzHS1AG4Lo= 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: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
Introduce cpu_dcache_is_aliasing() to fix DAX regression
|
expand
|
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 2fc22cae9089..acdc00bc05be 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -2124,8 +2124,8 @@ static struct mapped_device *alloc_dev(int minor) sprintf(md->disk->disk_name, "dm-%d", minor); dax_dev = alloc_dax(md, &dm_dax_ops); - if (IS_ERR_OR_NULL(dax_dev)) { - if (IS_ERR(dax_dev) && PTR_ERR(dax_dev) != -EOPNOTSUPP) + if (IS_ERR(dax_dev)) { + if (PTR_ERR(dax_dev) != -EOPNOTSUPP) goto bad; } else { set_dax_nocache(dax_dev);
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 <mathieu.desnoyers@efficios.com> Cc: Alasdair Kergon <agk@redhat.com> Cc: Mike Snitzer <snitzer@kernel.org> Cc: Mikulas Patocka <mpatocka@redhat.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Vishal Verma <vishal.l.verma@intel.com> Cc: Dave Jiang <dave.jiang@intel.com> Cc: Matthew Wilcox <willy@infradead.org> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Russell King <linux@armlinux.org.uk> 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 --- drivers/md/dm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)