Received: by 10.223.164.221 with SMTP id h29csp1336231wrb; Wed, 1 Nov 2017 14:39:37 -0700 (PDT) X-Google-Smtp-Source: ABhQp+RZVccVDHMMjpCLqByaPsEtVSiSlZqfjeqNbMA0ht0W7eBuUl7K/g5FUEtXak4vwh8AuWc6 X-Received: by 10.99.163.97 with SMTP id v33mr1223637pgn.206.1509572377399; Wed, 01 Nov 2017 14:39:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509572377; cv=none; d=google.com; s=arc-20160816; b=zwB4+GFUpOdOpvJHr1sS/CX9PiA3Fs0mWIyNG6Ys16ZuksIugR3tJ1zcvS2/C7XrO1 y4Qb5PGbADsjL5X84+JwXT+pDlACokH4GqnUl3ivb34PnkQqgXhmr5QeRwszGk/4u242 nnm+mFmNElCeFCyGBoTbhySY+osfhhx0RzaYoS7QP14dYQ0sQcc5jqvB8fAoAVTPw6mq +pW7lXQMXick4Vmxr6/23zZfmtKijioElSCn/kkObLLG0mOp7WCSCj1unPDIBHE7pQX+ A1+ptjh1+0z6nvKDTX1OQEJIEs50T8zwQ4MeNp5OXxSzHE52DERRKO0aRJ8TGnrReF4n oKZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=9YFTnx+dhWPTmUY6XZsf42XlHgDz9PyifR7ZkLivQ3w=; b=kLvtM3cEFx4dB5c+L1XwLlBi/XHRcN1pLwNgDcOdGk/WT5PoG07okqFTeKdM45MYmo D57LvcThEiY7PYGbsYYnV5hovnzNLOBTjg5fycj3y7QxnOpj6vkeo+0B60r9WMjh1U/k UGSTM9htOO6yZQNgKjb++Q2AZyBI6K7PEzsy9+SLj+tTCBjouB4F/jzjGXIs49VWFYng FlHSvxIQNH/RqrkdHscaXhoj73m5sVVMp3AMgdCncMPYYvrCC+KyHUkwLKFan0bgddip HXB/jI9RDYmEcR3ByTC3mhR9+Qaa4DTatkvrWvKzCu8Y3O94ybCrzVJhGVopqemIYA5f Jfdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alibaba-inc.com header.s=default header.b=H/PBi7Ko; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alibaba-inc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 60si598800pld.720.2017.11.01.14.39.23; Wed, 01 Nov 2017 14:39:37 -0700 (PDT) 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; dkim=pass header.i=@alibaba-inc.com header.s=default header.b=H/PBi7Ko; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alibaba-inc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934446AbdKAViv (ORCPT + 99 others); Wed, 1 Nov 2017 17:38:51 -0400 Received: from out0-201.mail.aliyun.com ([140.205.0.201]:57496 "EHLO out0-201.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932685AbdKAVis (ORCPT ); Wed, 1 Nov 2017 17:38:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alibaba-inc.com; s=default; t=1509572324; h=From:To:Subject:Date:Message-Id; bh=9YFTnx+dhWPTmUY6XZsf42XlHgDz9PyifR7ZkLivQ3w=; b=H/PBi7KoVTsoYQJHQ+/Ob9MvjqUMPyGa1rJIv7IpzwT7ziPKM0dxmvgAQW99qkRGhhqHx8Ryk6wStM0QzmqbrcHyeX2LTYEX962R2Zlm3KGZBPyplcR6HWbVsFZ+Vr15i00p+n78cEGG3qfCzvx9yVyEYJt1WuPAhZmECnfzplY= X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R761e4;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e02c03296;MF=yang.s@alibaba-inc.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---.9ISHIIp_1509572314; Received: from e19h19392.et15sqa.tbsite.net(mailfrom:yang.s@alibaba-inc.com ip:106.11.238.167) by smtp.aliyun-inc.com(127.0.0.1); Thu, 02 Nov 2017 05:38:40 +0800 From: "Yang Shi" To: mhocko@kernel.org, akpm@linux-foundation.org Cc: "Yang Shi" , , Subject: [PATCH] mm: use in_atomic() in print_vma_addr() Date: Thu, 02 Nov 2017 05:38:33 +0800 Message-Id: <1509572313-102989-1-git-send-email-yang.s@alibaba-inc.com> X-Mailer: git-send-email 1.8.3.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org commit 3e51f3c4004c9b01f66da03214a3e206f5ed627b ("sched/preempt: Remove PREEMPT_ACTIVE unmasking off in_atomic()") makes in_atomic() just check the preempt count, so it is not necessary to use preempt_count() in print_vma_addr() any more. Replace preempt_count() to in_atomic() which is a generic API for checking atomic context. Signed-off-by: Yang Shi --- mm/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memory.c b/mm/memory.c index a728bed..19b684e 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -4460,7 +4460,7 @@ void print_vma_addr(char *prefix, unsigned long ip) * Do not print if we are in atomic * contexts (in exception stacks, etc.): */ - if (preempt_count()) + if (in_atomic()) return; down_read(&mm->mmap_sem); -- 1.8.3.1 From 1583463447573273599@xxx Wed Nov 08 02:33:40 +0000 2017 X-GM-THRID: 1583174360594116469 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread