From patchwork Fri Aug 26 17:18:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 12956332 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 1BE14ECAAA6 for ; Fri, 26 Aug 2022 17:18:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 97990940008; Fri, 26 Aug 2022 13:18:05 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 90126940007; Fri, 26 Aug 2022 13:18:05 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 77B06940008; Fri, 26 Aug 2022 13:18:05 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 66396940007 for ; Fri, 26 Aug 2022 13:18:05 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 4A0441208CB for ; Fri, 26 Aug 2022 17:18:05 +0000 (UTC) X-FDA: 79842401730.04.6CC3C83 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by imf08.hostedemail.com (Postfix) with ESMTP id 99B38160020 for ; Fri, 26 Aug 2022 17:18:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661534284; x=1693070284; h=subject:from:to:cc:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fs681qlkVC3ILKSgH9kmbbCYwIlE7iUgG8xYi36A6tk=; b=KrXEKz34gVoq7UvTKy/9mN33zlY7N4lwQQYzv4l3J6RvTGdnlUABOZA4 QxR01PmVgg7bWAHcml9LBi5MBlkP9JiV4m3L7Wdukx+3hIknw3Yj6xDTS VKpqXkKjJjONDw0v/WNhvYU21gP9SKd6t4bRMaruS54gNbXIUdiujGY4a ZTMELyrKCoStYnn8kLhhsXtIC4AmfGYPzIJakosOM0Kh3lOdIp1XokihP eupBl4MNVC0NuWJfrWvZ29mDpQpsrQ5pibZsMffyDn4FQSR7ecnIi62VG uF3I7FXQd4CD760wwuEJIuw9TSFVOQV1ad+1k/cfYbrs9t3BfOK9tWlvD g==; X-IronPort-AV: E=McAfee;i="6500,9779,10451"; a="281525175" X-IronPort-AV: E=Sophos;i="5.93,265,1654585200"; d="scan'208";a="281525175" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Aug 2022 10:18:02 -0700 X-IronPort-AV: E=Sophos;i="5.93,265,1654585200"; d="scan'208";a="938824876" Received: from jodirobx-mobl2.amr.corp.intel.com (HELO dwillia2-xfh.jf.intel.com) ([10.209.108.22]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Aug 2022 10:18:01 -0700 Subject: [PATCH 2/4] xfs: Fix SB_BORN check in xfs_dax_notify_failure() From: Dan Williams To: akpm@linux-foundation.org, djwong@kernel.org Cc: Shiyang Ruan , Christoph Hellwig , Al Viro , Dave Chinner , Goldwyn Rodrigues , Jane Chu , Matthew Wilcox , Miaohe Lin , Naoya Horiguchi , Ritesh Harjani , nvdimm@lists.linux.dev, linux-xfs@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Date: Fri, 26 Aug 2022 10:18:01 -0700 Message-ID: <166153428094.2758201.7936572520826540019.stgit@dwillia2-xfh.jf.intel.com> In-Reply-To: <166153426798.2758201.15108211981034512993.stgit@dwillia2-xfh.jf.intel.com> References: <166153426798.2758201.15108211981034512993.stgit@dwillia2-xfh.jf.intel.com> User-Agent: StGit/0.18-3-g996c MIME-Version: 1.0 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1661534284; a=rsa-sha256; cv=none; b=Qj0MkGsp/KBbWhUmk00BpCGLAOke51tnfPXrUwCBz5VQZ3VDnyMCr9BvvA1hljvXxNJkm0 p7+iZQBH6f/xVOmTwysAbfeV1JIInL0JNuxu6CALzxxbFR/cku40gMNuZYiHaMrfcNVUyU WC61wcY/74v+fV31J+kL2tjli3m/s3g= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=none ("invalid DKIM record") header.d=intel.com header.s=Intel header.b=KrXEKz34; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf08.hostedemail.com: domain of dan.j.williams@intel.com designates 134.134.136.20 as permitted sender) smtp.mailfrom=dan.j.williams@intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1661534284; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=UC6Wm4YSJnedVaSXqdXRRk0AwtwLVySpdJ8006OVW88=; b=MheUHq8YneJ0Nde95DuWZMZttp85GqUiTjB5WsG7mA1DNmmWGu1ttFufCuHbL1sOzj06w2 5K0JlrJxUjCaM9h3JZhNrR295tXWbZPVYaeUTr5ihHzv9AqMiegieiQu10i1nVCEaqJCJY HjkiLcahSVX+/zlrEo7aJ05y4e2bCqg= Authentication-Results: imf08.hostedemail.com; dkim=none ("invalid DKIM record") header.d=intel.com header.s=Intel header.b=KrXEKz34; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf08.hostedemail.com: domain of dan.j.williams@intel.com designates 134.134.136.20 as permitted sender) smtp.mailfrom=dan.j.williams@intel.com X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: ezfa49c13xbjmzhybrzny36ujtkbkcc7 X-Rspamd-Queue-Id: 99B38160020 X-HE-Tag: 1661534284-433291 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: The SB_BORN flag is stored in the vfs superblock, not xfs_sb. Fixes: 6f643c57d57c ("xfs: implement ->notify_failure() for XFS") Cc: Shiyang Ruan Cc: Christoph Hellwig Cc: Darrick J. Wong Cc: Al Viro Cc: Dave Chinner Cc: Goldwyn Rodrigues Cc: Jane Chu Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Naoya Horiguchi Cc: Ritesh Harjani Cc: Andrew Morton Signed-off-by: Dan Williams Reviewed-by: Christoph Hellwig --- fs/xfs/xfs_notify_failure.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/xfs/xfs_notify_failure.c b/fs/xfs/xfs_notify_failure.c index 01e2721589c4..5b1f9a24ed59 100644 --- a/fs/xfs/xfs_notify_failure.c +++ b/fs/xfs/xfs_notify_failure.c @@ -175,7 +175,7 @@ xfs_dax_notify_failure( u64 ddev_start; u64 ddev_end; - if (!(mp->m_sb.sb_flags & SB_BORN)) { + if (!(mp->m_super->s_flags & SB_BORN)) { xfs_warn(mp, "filesystem is not ready for notify_failure()!"); return -EIO; }