Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp402831iof; Mon, 6 Jun 2022 05:49:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyyZ5EuIY5mUBEZbO3Gqr9jtqyL8TSPqBVbUkH3vUfRPqjKdnNSsIwSSImuZA9bCgjd0L8O X-Received: by 2002:a17:902:f149:b0:167:8569:ec00 with SMTP id d9-20020a170902f14900b001678569ec00mr3161790plb.8.1654519746478; Mon, 06 Jun 2022 05:49:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654519746; cv=none; d=google.com; s=arc-20160816; b=caD4rLwWNiPaLPMyzrKuJxDWQ2cIfImu8Top8Wfq32o6BPQQ9ngCnqaqAWjwVjCDrR spwB55VYhgJunmdsTCuXfWGrKGNPb/v22Os1myflHw2Fal35TxvRb+Z5Qtsfh2o++ujB Ba4sVTxBNovHsvUvjglbMK5EBc6ZgHczl2oV7NF/RkocddogXZ+a4kQLwm8Fay4TOomG S1e2ToZOJYz11txytatoe5RD9wgZunTa7fAl5uEsS41vmqHRaic3eh5jmNZShkNursUZ RcNT7xxQK4NSCIjFYilfz1uuFTQiEwiZAgB3YbJZTSRmII3Bjt4ZeDRdf5cqMWGfgF7j TFqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=r1GO4NK/Jiz8RFmlhNVithIgsmOjD1tHTDligDyAX9w=; b=xRfbTZqSMBA2HT27saxEOUe+jRXeZ11za/dbOtOOjACztgBVHUh2Ve79M9zADXtNzZ lxD/NviLtS2PIQZAG+6ZuF3UHhtT0TDBw7bTkF6qjZ4SyzDERRoHWwrmcVTw6JbonwCA T5Eq0FZHBesd0nS/sfi6q804RF+CFmL5HcMk0Z1jOsu7XPPwJleI1LY/8uCvNvNvuqci UbEZKHV/wUl4rrvQsNv6LQaFi0ZANTDy3nwf4iYJz4e6GzofJzmoFFUd+FdqWEGP6SmW PdxaTOGQE3Ihjb6DWhz6O+iCm84Jhu5ewL1A46G2sUrcawlAPRjE+PNs/5DWSJLwDGO/ UACQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=ORACbARk; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id p9-20020a63f449000000b003fbb0cb276fsi21087273pgk.369.2022.06.06.05.49.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 05:49:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=ORACbARk; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6BF93276239; Mon, 6 Jun 2022 05:42:25 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237557AbiFFMmW (ORCPT + 99 others); Mon, 6 Jun 2022 08:42:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237554AbiFFMmV (ORCPT ); Mon, 6 Jun 2022 08:42:21 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9F941A3AF; Mon, 6 Jun 2022 05:42:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=r1GO4NK/Jiz8RFmlhNVithIgsmOjD1tHTDligDyAX9w=; b=ORACbARkFUH7vtAeVUbWBOE2cK rHY85qqmpIP28DLzBhN6Du1nLheAUE/ydsYvaaKIxzdCVetkw+YeOgrNulIPHYvbcUa0ss3//3XhI 7d5hZBpICC3+ouSYBeETkouEYpTaQOrrk7ACRSOk174Bj9MidK2B7ZzWBwbVCdf1W/xMUqlRKXqwy ECwvnXdfjG+eUbAgyDgkl9MDFwOFqUmg4wfcBKzvOVSY4cGONJBU128zAkcnMd94XHQORATE9u6HV jsavlD/1kLpMZwxX2+WEyCmZBRpb9cj/mmQOCpJPDHs2M+RH2mijTGgNwOgtlhYdJvdGYRQNs1dEM 9qTfplpw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nyC3e-00Afmw-Pf; Mon, 06 Jun 2022 12:42:10 +0000 Date: Mon, 6 Jun 2022 13:42:10 +0100 From: Matthew Wilcox To: Jan Kara Cc: Jan Kara , tytso@mit.edu, Andreas Dilger , linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 1/3] quota: Prevent memory allocation recursion while holding dq_lock Message-ID: References: <20220605143815.2330891-1-willy@infradead.org> <20220605143815.2330891-2-willy@infradead.org> <20220606080334.tv5r7kljang55fat@quack3.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220606080334.tv5r7kljang55fat@quack3.lan> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Mon, Jun 06, 2022 at 10:03:34AM +0200, Jan Kara wrote: > On Sun 05-06-22 15:38:13, Matthew Wilcox (Oracle) wrote: > > As described in commit 02117b8ae9c0 ("f2fs: Set GF_NOFS in > > read_cache_page_gfp while doing f2fs_quota_read"), we must not enter > > filesystem reclaim while holding the dq_lock. Prevent this more generally > > by using memalloc_nofs_save() while holding the lock. > > > > Signed-off-by: Matthew Wilcox (Oracle) > > This is definitely a good cleanup to have and seems mostly unrelated to the > rest. I'll take it rightaway into my tree. Thanks for the patch! Thanks! It's really a pre-requisite for the second patch; I haven't seen anywhere in the current codebase that will have a problem. All the buffer_heads are allocated with GFP_NOFS | __GFP_NOFAIL (in grow_dev_page()).