Received: by 10.223.176.5 with SMTP id f5csp1988593wra; Sun, 4 Feb 2018 17:32:29 -0800 (PST) X-Google-Smtp-Source: AH8x226sJ7lF/HfyHz81/YifLPovdik7wF+CnpPUS6MldmJAh19Ml+9QVlm+BViwAothyBxPnRYt X-Received: by 2002:a17:902:8f86:: with SMTP id z6-v6mr8151262plo.352.1517794349573; Sun, 04 Feb 2018 17:32:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517794349; cv=none; d=google.com; s=arc-20160816; b=xLFgFXkBW1FS+Gkh6AgbOEv5KHp2YDgPHkhg6UTmI+Kh5xMBM+hPiYcE+xEyhxIBQ/ LO28ISg4pI802VrIeen+5ssFSEjIDVLeeabwLKh0WCMEe1g6mgLBZhEz6ATsONPGJWkv FZlX9wSgIRSIfDCFHsoGeecpVwd4IQ23QgS5nE+94PLDe0/eH93wwfkjyA7IRtmokKm9 hR1okRUdBPZqBRZNTnpoEwn1fb+eSzBoIbveZeUQuaVOLmbvkYiWAKaCmnPGCOUjM1Qt mOds95Gp4PouJPL6rNqycJjajhNcwkxwK8PH09S77U/zUna9d5RVFt7IIl5R2sPBnr/i G92w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=A8KvjS70nxwh2ctMzkZkjjbASO+ZYwqkpSxQFRTWKsE=; b=H8gHFCj27QQvtZ9Dz6UKGD1ow1lpcc5GcdXj1FUAyvT9XtHLIokHyTPkCGU/rayVqy qzY4SJuqhYkEv1bdItfCH5EJz75W/L55cz/X9A1rrlJARWyQeaVlLP7qJ3G0wqEmA+kN Nc11eoGHTQD+7rfdPYNK9lX2lnOS43aqSFerI5Af9b4hReVOHZxw/VdA2Byrhvn//JIi JQZA6m5shP2zAKEYATSK8/fKMSOjf/xSsw8BjF+m3kJUs12vnZQ4ywMtggD0TY9yVGwx Ya6K7OPTbGwULxibQFnxW1CWBWeNr/3YDcm9+4xgjTOib+lmemy6XWtQRj91BWM8UZhy GONQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z21si1885689pfl.96.2018.02.04.17.32.14; Sun, 04 Feb 2018 17:32:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752830AbeBEBat (ORCPT + 99 others); Sun, 4 Feb 2018 20:30:49 -0500 Received: from mx2.suse.de ([195.135.220.15]:44124 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752575AbeBEB3e (ORCPT ); Sun, 4 Feb 2018 20:29:34 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 219FFAE32; Mon, 5 Feb 2018 01:28:02 +0000 (UTC) From: Davidlohr Bueso To: akpm@linux-foundation.org, mingo@kernel.org Cc: peterz@infradead.org, ldufour@linux.vnet.ibm.com, jack@suse.cz, mhocko@kernel.org, kirill.shutemov@linux.intel.com, mawilcox@microsoft.com, mgorman@techsingularity.net, dave@stgolabs.net, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Davidlohr Bueso Subject: [PATCH 63/64] mm/mmap: hack drop down_write_nest_lock() Date: Mon, 5 Feb 2018 02:27:53 +0100 Message-Id: <20180205012754.23615-64-dbueso@wotan.suse.de> X-Mailer: git-send-email 2.12.3 In-Reply-To: <20180205012754.23615-1-dbueso@wotan.suse.de> References: <20180205012754.23615-1-dbueso@wotan.suse.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Davidlohr Bueso * THIS IS A HACK * Directly call down_write() on i_mmap_rwsem (such that we don't have to convert it to a range lock) Signed-off-by: Davidlohr Bueso --- mm/mmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/mmap.c b/mm/mmap.c index e10d005f7e2f..1d3a5edd19b2 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -3394,7 +3394,7 @@ static void vm_lock_anon_vma(struct mm_struct *mm, struct anon_vma *anon_vma) * The LSB of head.next can't change from under us * because we hold the mm_all_locks_mutex. */ - down_write_nest_lock(&anon_vma->root->rwsem, &mm->mmap_sem); + down_write(&anon_vma->root->rwsem); /* * We can safely modify head.next after taking the * anon_vma->root->rwsem. If some other vma in this mm shares @@ -3424,7 +3424,7 @@ static void vm_lock_mapping(struct mm_struct *mm, struct address_space *mapping) */ if (test_and_set_bit(AS_MM_ALL_LOCKS, &mapping->flags)) BUG(); - down_write_nest_lock(&mapping->i_mmap_rwsem, &mm->mmap_sem); + down_write(&mapping->i_mmap_rwsem); } } -- 2.13.6