From patchwork Wed Jan 13 13:40:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 12016815 Return-Path: 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 570A2C433E0 for ; Wed, 13 Jan 2021 13:40:54 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3A3C8233EA for ; Wed, 13 Jan 2021 13:40:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3A3C8233EA 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 69C9D8D0056; Wed, 13 Jan 2021 08:40:51 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 64D0E8D002E; 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 4B19F8D0057; Wed, 13 Jan 2021 08:40:51 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0216.hostedemail.com [216.40.44.216]) by kanga.kvack.org (Postfix) with ESMTP id 3248A8D0056 for ; Wed, 13 Jan 2021 08:40:51 -0500 (EST) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 00CEB824556B for ; Wed, 13 Jan 2021 13:40:51 +0000 (UTC) X-FDA: 77700862302.04.truck50_39138162751e Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin04.hostedemail.com (Postfix) with ESMTP id D3D56800227A for ; Wed, 13 Jan 2021 13:40:50 +0000 (UTC) X-HE-Tag: truck50_39138162751e X-Filterd-Recvd-Size: 3521 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by imf47.hostedemail.com (Postfix) with ESMTP for ; Wed, 13 Jan 2021 13:40:50 +0000 (UTC) Received: by mail-wm1-f46.google.com with SMTP id 3so1650992wmg.4 for ; Wed, 13 Jan 2021 05:40:49 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=AReF/Pb/hU+fqwaRLVxdlFX6l/fsbGy8vg+o0T0tRKo=; b=klqjwJEgVbZYwDtZ6ngZzhrQcr8l5xzwaNa/jRMYreFd07PheGQNQ7ZA8SqjikfyRI sWqBmOVzF3NiyE5aFiYxlF4hPzAVKC6sjr9W26Z6q8fn7rGAQr6jsh4ldZ3+8N5iUs9/ GGFKxtfao8oxLbeXjVV09YFcnuOehljiJxbF4= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=AReF/Pb/hU+fqwaRLVxdlFX6l/fsbGy8vg+o0T0tRKo=; b=cN8b9o1gEwHuZj01z2TeBwAh8XqCKaVBrXalzqLgzWR9kauQO378WGxoXNDwypmQtA zldHT55LCs1/QL3PJNKdH0+mfslb7ps2/g/0N3E7W9t9DGoTK4XlU5XdCJF69pUXAGCK /GOdBfQiKZ/yWjLruvL2YetEMHKVdxcIG1ovXbNPdSjErKYcWjOos9IPCOohQomezNfB qkY9JR0fgxh1Kr8dVt06GpAm5i8RX7nmzmXLewYEBmlttdrONHsW2dOXC+QAOPbxffhb iva3ad+JDussVa+/r/pRnHIuvdImhLdQ8NP5BYiexym4SAdsjnOeoekuPBp8Tz/pgsNp c0fA== X-Gm-Message-State: AOAM5313lekjNDzaUZ/7Bwup/3lzkEza1mpHM+0L53DqquMGtH/hjKu5 zzTmKMxe+E+j6vFdU71IEticRg== X-Google-Smtp-Source: ABdhPJxKhyEG2xgFW59hdUdQb6YwumM+sVsWxxlQL5P5k2uIl8u2Bi8Oo09LvqU9dWUR7v+9Ii2rpQ== X-Received: by 2002:a1c:6a13:: with SMTP id f19mr2242755wmc.10.1610545248987; Wed, 13 Jan 2021 05:40:48 -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.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Jan 2021 05:40:48 -0800 (PST) From: Daniel Vetter To: LKML Cc: Daniel Vetter , Daniel Vetter , Andrew Morton , linux-mm@kvack.org Subject: [PATCH 2/2] bdi: Use might_alloc() Date: Wed, 13 Jan 2021 14:40:33 +0100 Message-Id: <20210113134033.3569683-2-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210113134033.3569683-1-daniel.vetter@ffwll.ch> References: <20210113134033.3569683-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 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: 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 Cc: Andrew Morton Cc: linux-mm@kvack.org --- mm/backing-dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/backing-dev.c b/mm/backing-dev.c index e33797579338..3bb7807c2f0c 100644 --- a/mm/backing-dev.c +++ b/mm/backing-dev.c @@ -580,7 +580,7 @@ struct bdi_writeback *wb_get_create(struct backing_dev_info *bdi, { struct bdi_writeback *wb; - might_sleep_if(gfpflags_allow_blocking(gfp)); + might_alloc(mem_flags); if (!memcg_css->parent) return &bdi->wb;