Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3877899ybc; Thu, 14 Nov 2019 16:28:10 -0800 (PST) X-Google-Smtp-Source: APXvYqzHjOHlUrMJJEzluuXPy2ZcroKrG6I6Vi9+FQejbgrcZI0sgEyoLwavMg8Buwfm8BSs9QM3 X-Received: by 2002:adf:f44a:: with SMTP id f10mr12067459wrp.63.1573777690328; Thu, 14 Nov 2019 16:28:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573777690; cv=none; d=google.com; s=arc-20160816; b=rbuZ52H0gMfPI7roHdDr52s1uOov7CDDWaxUE4rxKNIwr2i3d5TXDi6S3/566EqHYP tO39nyj3GO7GUJ+G6ObqLEnA6jJUvzcf/MgM9BJPN43Q8vDyM+ardDBq3Wunn0B84m53 qayp19eGLKaJlfWwIsYkObWFRspZN81Wc3hh/TIjzAerI1gGocenXDgwug/08yTndROZ k5Osy8FdW2qEvShYykSBF2zdZ3csx3+PpTQNIJjH3DHmeC/x6OH6/sPDMyKwEo9K2n4x 6Zc1ARvRUBK1V/c3WRrJ5HsDEsdt8Y1hhdh4iMckrs6EGe2A+AcTZjDm0AujMKIEKqqo TERQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=9DEzVdIdRlfjNWR24eeYV4SIk118U/i/j2oVNRB2rQc=; b=INFzGp/ZGVefi1RzrVs6j7E9XXQYi9MQtfiDfa71syyVVjDV7e38NlL9ZHfbbBMKwl Io/Yun34QOYFNbjyJ8g83B4jL9/N8sGBYZ1aTwOFAtPhZ2rD5/WWU1ttMCOgOEXvzx+a NGZf5S5fFfmqz0tMBpK1SWDBj3I4u/logVWhd/vUlIqJ9OTZHrOhxQoGhs/T4wHANrQW WqFLiCOVaJaM2M0bBKCzaaAgx9YZ6oJ5YjTGUa4orvJT7YvUkqIupZdd+ObbVP7acDZx 24Owz/h5m5ld3rXTbALf+t9atzO0H9oZ8LVFBudOVKcC5nvj8hTSxXvc1p6DWE2e4N2h O+yQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n8si4250609eja.438.2019.11.14.16.27.36; Thu, 14 Nov 2019 16:28:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726986AbfKOA1U (ORCPT + 99 others); Thu, 14 Nov 2019 19:27:20 -0500 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:55252 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726852AbfKOA1U (ORCPT ); Thu, 14 Nov 2019 19:27:20 -0500 Received: from callcc.thunk.org (guestnat-104-133-0-98.corp.google.com [104.133.0.98] (may be forged)) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id xAF0RADX023679 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Nov 2019 19:27:11 -0500 Received: by callcc.thunk.org (Postfix, from userid 15806) id DE1A24202FD; Thu, 14 Nov 2019 19:27:09 -0500 (EST) Date: Thu, 14 Nov 2019 19:27:09 -0500 From: "Theodore Y. Ts'o" To: Jan Kara Cc: Konstantin Khlebnikov , Ritesh Harjani , Andreas Dilger , linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, Dmitry Monakhov , Eric Whitney Subject: Re: [PATCH] ext4: deaccount delayed allocations at freeing inode in ext4_evict_inode() Message-ID: <20191115002709.GA9640@mit.edu> References: <157233344808.4027.17162642259754563372.stgit@buzz> <20191108020827.15D1EAE056@d06av26.portsmouth.uk.ibm.com> <20191108115420.GI20863@quack2.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191108115420.GI20863@quack2.suse.cz> User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org > From ee27836b579d3bf750d45cd7081d3433ea6fedd5 Mon Sep 17 00:00:00 2001 > From: Jan Kara > Date: Fri, 8 Nov 2019 12:45:11 +0100 > Subject: [PATCH] ext4: Fix leak of quota reservations > > Commit 8fcc3a580651 ("ext4: rework reserved cluster accounting when > invalidating pages") moved freeing of delayed allocation reservations > from dirty page invalidation time to time when we evict corresponding > status extent from extent status tree. For inodes which don't have any > blocks allocated this may actually happen only in ext4_clear_blocks() > which is after we've dropped references to quota structures from the > inode. Thus reservation of quota leaked. Fix the problem by clearing > quota information from the inode only after evicting extent status tree > in ext4_clear_inode(). > > Reported-by: Konstantin Khlebnikov > Fixes: 8fcc3a580651 ("ext4: rework reserved cluster accounting when invalidating pages") > Signed-off-by: Jan Kara OK, I've applied this patch. - Ted