Message ID | 166329932730.2786261.8645669907699123863.stgit@dwillia2-xfh.jf.intel.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 18C84C32771 for <linux-mm@archiver.kernel.org>; Fri, 16 Sep 2022 03:35:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AC0D18D0005; Thu, 15 Sep 2022 23:35:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A228F8D0001; Thu, 15 Sep 2022 23:35:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8C4468D0005; Thu, 15 Sep 2022 23:35:30 -0400 (EDT) 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 781468D0001 for <linux-mm@kvack.org>; Thu, 15 Sep 2022 23:35:30 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id D9A381A04FE for <linux-mm@kvack.org>; Fri, 16 Sep 2022 03:35:29 +0000 (UTC) X-FDA: 79916533578.12.8D98A5C Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by imf18.hostedemail.com (Postfix) with ESMTP id 459BB1C00A1 for <linux-mm@kvack.org>; Fri, 16 Sep 2022 03:35:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663299329; x=1694835329; h=subject:from:to:cc:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=3wvSjSkW/zXAYAgI4UeAUQfAuIeQwEc+TBBp6c7MzGs=; b=PLTJVHVCKrbYbqwDYaBtUUEbV+Ytmtgbhx6rEGx5CuBgAC/q3sZKXN+2 FyNCTQYIKpxmvALndaaSxHocrHaMZi16flXwVa6YZ2m5TXGLoL9yJYO3m LESslJ88o8A4N8ExHf68UqXDXh8curFozKYj/NibuE4LMYvsmyo3z+lQH r2mGK/KVbVfHGMOIbo8khFySGyWBAjgESfzqi/H3UJUZTDu+3PVRfiWfp yw9X3cOxfnL208GN+AEfUckb+Vb/dvGnACSelhRatwCRj2qYvYAiJBt53 xw5AF2XRNUX6W1lK/82E7pNpPrhM+/XInH2mf0YGZlSgiMv3UXGM6brcR A==; X-IronPort-AV: E=McAfee;i="6500,9779,10471"; a="299726091" X-IronPort-AV: E=Sophos;i="5.93,319,1654585200"; d="scan'208";a="299726091" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Sep 2022 20:35:28 -0700 X-IronPort-AV: E=Sophos;i="5.93,319,1654585200"; d="scan'208";a="792961807" Received: from colinlix-mobl.amr.corp.intel.com (HELO dwillia2-xfh.jf.intel.com) ([10.209.29.52]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Sep 2022 20:35:27 -0700 Subject: [PATCH v2 03/18] fsdax: Include unmapped inodes for page-idle detection From: Dan Williams <dan.j.williams@intel.com> To: akpm@linux-foundation.org Cc: Matthew Wilcox <willy@infradead.org>, Jan Kara <jack@suse.cz>, "Darrick J. Wong" <djwong@kernel.org>, Jason Gunthorpe <jgg@nvidia.com>, Christoph Hellwig <hch@lst.de>, John Hubbard <jhubbard@nvidia.com>, linux-fsdevel@vger.kernel.org, nvdimm@lists.linux.dev, linux-xfs@vger.kernel.org, linux-mm@kvack.org, linux-ext4@vger.kernel.org Date: Thu, 15 Sep 2022 20:35:27 -0700 Message-ID: <166329932730.2786261.8645669907699123863.stgit@dwillia2-xfh.jf.intel.com> In-Reply-To: <166329930818.2786261.6086109734008025807.stgit@dwillia2-xfh.jf.intel.com> References: <166329930818.2786261.6086109734008025807.stgit@dwillia2-xfh.jf.intel.com> User-Agent: StGit/0.18-3-g996c MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=none ("invalid DKIM record") header.d=intel.com header.s=Intel header.b=PLTJVHVC; spf=pass (imf18.hostedemail.com: domain of dan.j.williams@intel.com designates 134.134.136.24 as permitted sender) smtp.mailfrom=dan.j.williams@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1663299329; a=rsa-sha256; cv=none; b=veDRjFzlpv2K7x6TBvs2SNoYKunAjAyrmuxoP0lGDMDRsd7Bj3uU1u+5p0sWbFK3oxn2AR cP/E5si9/ISoin7CjQ6Hb9fubGKDMVLa55dRSaAH64CFPv/kGNY8iZeNOqwCkaQkdPVWPo T2l8znvR6wcYd+59UDohQ8xJZd57ljY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1663299329; 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=mg4sUw8CPGU23UE7zMKNYtu26deQnjSIF5al9lMmnVE=; b=mTaVJPsPRP8zyhjjI3chIUQLknxGWuAJtvEiU3H11Cstn05XX7zIMQknesjNhcLa4pFSCQ oq4hLaoCbPOPrMlYiTEupc6kPR9l40LJKgz2ITRRNsjQL+eP3RWdSFqMpzMv65UGXiyP/H Bg6s7hzf7fK0gXSjOUgQq4Kt5DUmrLo= X-Rspamd-Queue-Id: 459BB1C00A1 X-Rspam-User: Authentication-Results: imf18.hostedemail.com; dkim=none ("invalid DKIM record") header.d=intel.com header.s=Intel header.b=PLTJVHVC; spf=pass (imf18.hostedemail.com: domain of dan.j.williams@intel.com designates 134.134.136.24 as permitted sender) smtp.mailfrom=dan.j.williams@intel.com; dmarc=pass (policy=none) header.from=intel.com X-Stat-Signature: gue6se85zo5kqbf1tcwbeapfx5y5cb3u X-Rspamd-Server: rspam04 X-HE-Tag: 1663299329-527865 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> |
Series |
Fix the DAX-gup mistake
|
expand
|
diff --git a/fs/dax.c b/fs/dax.c index e762b9c04fb4..76bad1c095c0 100644 --- a/fs/dax.c +++ b/fs/dax.c @@ -698,7 +698,7 @@ struct page *dax_layout_busy_page_range(struct address_space *mapping, if (IS_ENABLED(CONFIG_FS_DAX_LIMITED)) return NULL; - if (!dax_mapping(mapping) || !mapping_mapped(mapping)) + if (!dax_mapping(mapping)) return NULL; /* If end == LLONG_MAX, all pages from start to till end of file */
A page can remain pinned even after it has been unmapped from userspace / removed from the rmap. In advance of requiring that all dax_insert_entry() events are followed up 'break layouts' before a truncate event, make sure that 'break layouts' can find unmapped entries. Cc: Matthew Wilcox <willy@infradead.org> Cc: Jan Kara <jack@suse.cz> Cc: "Darrick J. Wong" <djwong@kernel.org> Cc: Jason Gunthorpe <jgg@nvidia.com> Cc: Christoph Hellwig <hch@lst.de> Cc: John Hubbard <jhubbard@nvidia.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> --- fs/dax.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)