Message ID | 20210113134033.3569683-1-daniel.vetter@ffwll.ch (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=ytkm=GQ=kvack.org=owner-linux-mm@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C7909C433DB for <linux-mm@archiver.kernel.org>; Wed, 13 Jan 2021 13:40:52 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 24D5B23339 for <linux-mm@archiver.kernel.org>; Wed, 13 Jan 2021 13:40:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 24D5B23339 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2CA688D0055; Wed, 13 Jan 2021 08:40:51 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 27BC38D002E; Wed, 13 Jan 2021 08:40:51 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 191858D0055; Wed, 13 Jan 2021 08:40:51 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0161.hostedemail.com [216.40.44.161]) by kanga.kvack.org (Postfix) with ESMTP id 079478D002E for <linux-mm@kvack.org>; Wed, 13 Jan 2021 08:40:51 -0500 (EST) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id AC1703632 for <linux-mm@kvack.org>; Wed, 13 Jan 2021 13:40:50 +0000 (UTC) X-FDA: 77700862260.10.frog82_0c063c52751e Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin10.hostedemail.com (Postfix) with ESMTP id 8AE5416A4CC for <linux-mm@kvack.org>; Wed, 13 Jan 2021 13:40:50 +0000 (UTC) X-HE-Tag: frog82_0c063c52751e X-Filterd-Recvd-Size: 3395 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) by imf50.hostedemail.com (Postfix) with ESMTP for <linux-mm@kvack.org>; Wed, 13 Jan 2021 13:40:49 +0000 (UTC) Received: by mail-wm1-f47.google.com with SMTP id k10so1622538wmi.3 for <linux-mm@kvack.org>; Wed, 13 Jan 2021 05:40:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=MFzodEjW4sHgpqzrfFhyl8i1bcr7U3hZwXGAiwujPcs=; b=leDlFmHJl3DrcJDqdemz/ITGhb8jeil1B2sae+wLzm9LRoAV03upDzuG9eCIfT+O3W FofGQukBW4w91Bu086sO4dUU3W4HV2e3yxBlrV0hqObiqrApPfOBlbr4Js3SWGecLZtg PkDPPEFqOgM85h9NJzligj9e8uxWr10eUSwJI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=MFzodEjW4sHgpqzrfFhyl8i1bcr7U3hZwXGAiwujPcs=; b=Wh77+rL9GaQWDEfoh+8dcGmirjUDRHMdxBMPGRyrRw5KVfuwm08PmT+KN27IRBN/Lk n2vCyzBpIVv1alozlWwGbZ+H/UQiF5lK0BFMDd+iexmmJWvBMi7rZ8xAPbclICpWb7/P GHx3472KyBtUSMjDgh7RlX98f0O9sFUZRJyh/vNoTvjrqjpVjXqLxWE0AuUAWQtWMq0w fJxns6SK2eIbe4TrmAThmdh5ZM4aiYXK6nMAyFaZVh23BEW1D/s22SITiYwwktuI5wkm txEkzfw55pMVfXKKzalE2zwDytRqGcrhULYnaQE581Ubjxqsjy00ISuCMEazOdxPjK9l x5ag== X-Gm-Message-State: AOAM530+KPBXJlpF4Bb3pEchM1VHrz09nhwRYGljiHtk3WhHfhANeFON pFuY6DDS4jsOixyRjIvzL+Sxhw== X-Google-Smtp-Source: ABdhPJwRIRVFwJp0Hh/9snpfjpdMVRAI69gyiVYlhrbBJjMJRUG3bx18cabm50BvhrWxYr0nCYnHxg== X-Received: by 2002:a1c:80c3:: with SMTP id b186mr2240920wmd.20.1610545247845; Wed, 13 Jan 2021 05:40:47 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id g5sm3741054wro.60.2021.01.13.05.40.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Jan 2021 05:40:47 -0800 (PST) From: Daniel Vetter <daniel.vetter@ffwll.ch> To: LKML <linux-kernel@vger.kernel.org> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>, Daniel Vetter <daniel.vetter@intel.com>, Andrew Morton <akpm@linux-foundation.org>, linux-mm@kvack.org Subject: [PATCH 1/2] mm/dmapool: Use might_alloc() Date: Wed, 13 Jan 2021 14:40:32 +0100 Message-Id: <20210113134033.3569683-1-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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 |
[1/2] mm/dmapool: Use might_alloc()
|
expand
|
diff --git a/mm/dmapool.c b/mm/dmapool.c index a97c97232337..d89c6966548d 100644 --- a/mm/dmapool.c +++ b/mm/dmapool.c @@ -319,7 +319,7 @@ void *dma_pool_alloc(struct dma_pool *pool, gfp_t mem_flags, size_t offset; void *retval; - might_sleep_if(gfpflags_allow_blocking(mem_flags)); + might_alloc(mem_flags); spin_lock_irqsave(&pool->lock, flags); list_for_each_entry(page, &pool->page_list, page_list) {
Now that my little helper has landed, use it more. On top of the existing check this also uses lockdep through the fs_reclaim annotations. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: linux-mm@kvack.org --- mm/dmapool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)