From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7060EB64DD for ; Mon, 7 Aug 2023 09:32:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 36E1A6B0072; Mon, 7 Aug 2023 05:32:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2F6D46B0074; Mon, 7 Aug 2023 05:32:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1975B8D0002; Mon, 7 Aug 2023 05:32:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id EEFEF6B0072 for ; Mon, 7 Aug 2023 05:32:29 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id B92701C9818 for ; Mon, 7 Aug 2023 09:32:29 +0000 (UTC) X-FDA: 81096793218.10.943D3D8 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf07.hostedemail.com (Postfix) with ESMTP id 179B540004 for ; Mon, 7 Aug 2023 09:32:27 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=uZZhcbFU; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf07.hostedemail.com: domain of cem@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=cem@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1691400748; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=hTLwu/lRTtvTxaVNzpm8eRL5g2gBS280V3iHLlwV41g=; b=BnoLTiaZbunDeiRdRd/azS7qOh9KjFDUzUFXnuvh+4aLHemLzknSv/W2ORyMz7U9uPV3Lx f55RTdj5rBGDKV8QkiJ0iIGidJ237gdAOZbwgyja3MpqhUfM1DQH4QxSZTnnjHMiuGoISt OyvK1jY2O/ws0e7OrFNFNuUSy+V5I0s= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=uZZhcbFU; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf07.hostedemail.com: domain of cem@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=cem@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1691400748; a=rsa-sha256; cv=none; b=mf0z1emj1ZHSmzEAVveCU9iP2dJG1rEntrLcw5Fi0t9SxI7/tcCm6Y0hRnFrvA2Gf/f+bM 9I4h2MtVntS4K3cH/NWQeyANoXilJRCxWb5Sc0A2S4TtPM4Iv/8UZgOYd8/17nlAzxdDeq ry5TLr10yK3ghSaj63ThUi4ja/9bcCI= Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2E8B161715; Mon, 7 Aug 2023 09:32:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 08119C433C8; Mon, 7 Aug 2023 09:32:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691400747; bh=DpNYwtYrwfljS4CMIV07Nd0nS/vqOGyRd8hR2TtIQY0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=uZZhcbFUJlt23mAm8ggkcMaD4EC3gdcbtbg+fV/MDTf705mzrAPJ07gWILmEnmm1x uNVMUNZRV1+04M/z6R//cdteHxYv7Newqrz7AtJqYKNg7fEjt9izrCu7Xsg0Xw0qtF acMRwlKGJXz+WE1GdeiqK5j+I6pWKQYvok1f6w1IQjKev/th17EEL9Yc9replv1r0c OjRXQHT+f4wnyqIffIPHi8qcCBKD+VovjctZx02l1CCyzE0J9J5oRBBbzCEQy9zP1M Uepa2jhR+oyVTAaa42fdGvNoxpy2sDK8Mmq3RG2474YSM1jqoZbQGuIfDv93EcJg7n taseiX50VeTsw== Date: Mon, 7 Aug 2023 11:32:22 +0200 From: Carlos Maiolino To: Christian Brauner Cc: Hugh Dickins , Jan Kara , Dan Carpenter , Andrew Morton , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH vfs.tmpfs] shmem: move spinlock into shmem_recalc_inode() to fix quota support Message-ID: <20230807093222.o46d7kexapywe5jl@andromeda> References: <29f48045-2cb5-7db-ecf1-72462f1bef5@google.com> <20230804-legalisieren-neukonzeption-97314400abbd@brauner> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230804-legalisieren-neukonzeption-97314400abbd@brauner> X-Rspam-User: X-Stat-Signature: are1hmuupejcz9wz4rycx1j1d7bajsee X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 179B540004 X-HE-Tag: 1691400747-939907 X-HE-Meta: U2FsdGVkX1+wH0vLMX1z7ru1zreqUiEHOIFyvO7e8VjyoBlQi80Aw44fdOQH5YsyyrEzOIBP7eZjvcqdVgFB5vJsWQhRFRIm6xx7K2HrnYA1Y+fE6+bhYhpHIxstPYROar/QRi3CVPximNuTXXgsplLttPJ/ugIo7nNJNrrLoqQnvTh/KNIAM/3V646exN+5ZP3FvmPfidVVYWJ2vSsda2IxZkvJdad/oLtZ9Q/S18BApCptULGx87ZeVWu6q55hSDoTG9mo0txi55TAP7OGyQCXbhVBhfBQQd0PdaJbrgiIMPePPoEBwPX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-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: On Fri, Aug 04, 2023 at 11:31:33AM +0200, Christian Brauner wrote: > On Thu, 03 Aug 2023 22:46:11 -0700, Hugh Dickins wrote: > > Commit "shmem: fix quota lock nesting in huge hole handling" was not so > > good: Smatch caught shmem_recalc_inode()'s shmem_inode_unacct_blocks() > > descending into quota_send_warning(): where blocking GFP_NOFS is used, > > yet shmem_recalc_inode() is called holding the shmem inode's info->lock. > > > > Yes, both __dquot_alloc_space() and __dquot_free_space() are commented > > "This operation can block, but only after everything is updated" - when > > calling flush_warnings() at the end - both its print_warning() and its > > quota_send_warning() may block. > > > > [...] > > Applied to the vfs.tmpfs branch of the vfs/vfs.git tree. > Patches in the vfs.tmpfs branch should appear in linux-next soon. > > Please report any outstanding bugs that were missed during review in a > new review to the original patch series allowing us to drop it. > > It's encouraged to provide Acked-bys and Reviewed-bys even though the > patch has now been applied. If possible patch trailers will be updated. > > Note that commit hashes shown below are subject to change due to rebase, > trailer updates or similar. If in doubt, please check the listed branch. > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git > branch: vfs.tmpfs > > [1/1] shmem: move spinlock into shmem_recalc_inode() to fix quota support > https://git.kernel.org/vfs/vfs/c/f384c361c99e Once Hugh patch fixes the issue Dan reported, I believe I don't need to resubmit my series? Cheers. Carlos