Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1703043ybc; Sun, 17 Nov 2019 05:38:48 -0800 (PST) X-Google-Smtp-Source: APXvYqyE3tmoKGpDrXCbgnWHkHQjt26uwN2aG0Rvq0hh7URtze0P2JRIbxXToHf0kaRLIftqGh+4 X-Received: by 2002:a17:906:95c4:: with SMTP id n4mr18124653ejy.39.1573997928725; Sun, 17 Nov 2019 05:38:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1573997928; cv=pass; d=google.com; s=arc-20160816; b=nTv9PsH7UhnoFcQGxQaCz7LtXAuQWk1ixhgU6bg94+q6z4+Qn8mwieWqcID8eMo0pU h/NrogfpQY9h8DPayMiCf3bPNNVeVYnfIspevd/XjRA0Ileffl/WPH3jGr/pO8sK2e1Z /ge7RTErDpFmFRLyT09G3XZHFzBPeJvCiFEDB163UBYKpySNFarZ/paKUD0wTAnolR1E J4uPEo70o5w4A1Zx8OiMMI8Xk5V6mKhAW8hZoMZ2HaUdIGWPasRPyiecO9q1negl35D/ VUBBcHvp4D3lzRgsx4dBzRtSUE756K0bB2aR0DL16UJrPzB2CuAK7h9eAB0SLMAeMmE8 vC+A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :date:subject:message-id:cc:to:from:dkim-signature; bh=bbpR7jOn1tWkOik0+7zAOlYex1xS4WFEXsmnmFvAWdM=; b=gAh6Pd/jVl2B/xkhAK0AtOFCCDvps0M24T3MzUzOUvP0fgpygZfcmQtH5xZmjRh9kc QeyWN+Vq0hF+VQbk2Oq6erzs8DBnNLpFvYAx7pJc6MdkhTAvzHIGJ1k5Nou4KEtau7IY XOpDxbC7zmVcIMj3pMuGo3EuTQHOQtcHk/m7gsD34isJdCrtHIgzNphAabCZ4K0nlBog FHe9u9UGqr6xdZallmL7u2UH6V38cAQ3lrCJF2Bu5g1HnpY7Y3394QS+nmlakXs6ZeZJ nJMQqMusT2302VqrjDaQ83XEZZ6Ft9h2Cvp6pGa4gI68XDgSERqTtClFeElavpsdOX12 dz9w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@mykernel.net header.s=zohomail header.b=a6ST8dJZ; arc=pass (i=1 spf=pass spfdomain=mykernel.net dkim=pass dkdomain=mykernel.net dmarc=pass fromdomain=mykernel.net>); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 e18si9408999ejq.399.2019.11.17.05.38.23; Sun, 17 Nov 2019 05:38:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@mykernel.net header.s=zohomail header.b=a6ST8dJZ; arc=pass (i=1 spf=pass spfdomain=mykernel.net dkim=pass dkdomain=mykernel.net dmarc=pass fromdomain=mykernel.net>); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726116AbfKQNgY (ORCPT + 99 others); Sun, 17 Nov 2019 08:36:24 -0500 Received: from sender3-of-o52.zoho.com.cn ([124.251.121.247]:21947 "EHLO sender2.zoho.com.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726037AbfKQNgY (ORCPT ); Sun, 17 Nov 2019 08:36:24 -0500 X-Greylist: delayed 918 seconds by postgrey-1.27 at vger.kernel.org; Sun, 17 Nov 2019 08:36:06 EST ARC-Seal: i=1; a=rsa-sha256; t=1573996834; cv=none; d=zoho.com.cn; s=zohoarc; b=gA3utkj4m2vuOiQTTK0cNW72xnBOOzoUujRHi6BnJTkBehIP9Lm4IEBh/60ilaYy3Ni9jOvdLNeC3BEGurID9QaT0mojPUFZ+H0iPqBffBKF/2lzyXtJLoFTEdWlpbCx69MEWqBdeOgQpsOb13mpXd2BiVsfMD8qKz5SG8bjBpY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com.cn; s=zohoarc; t=1573996834; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:MIME-Version:Message-ID:Subject:To; bh=bbpR7jOn1tWkOik0+7zAOlYex1xS4WFEXsmnmFvAWdM=; b=fTujq2cDWnhR6N1o4/GnSQHy2AQBZEYkaOxjZyjMar8kuswJ4BcUpRAgBAD+Ghc+NchZG790iJx1NRSxWoZlVeIVyF27f91baJCgbU/g82BFWINR95mFImSIK01ssY1nwM9Eu0HuOy9u7XYkopKik4nDAlsARydEqJBjs/qSQmI= ARC-Authentication-Results: i=1; mx.zoho.com.cn; dkim=pass header.i=mykernel.net; spf=pass smtp.mailfrom=cgxu519@mykernel.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1573996834; s=zohomail; d=mykernel.net; i=cgxu519@mykernel.net; h=From:To:Cc:Message-ID:Subject:Date:MIME-Version:Content-Transfer-Encoding:Content-Type; l=1041; bh=bbpR7jOn1tWkOik0+7zAOlYex1xS4WFEXsmnmFvAWdM=; b=a6ST8dJZeoCSSHgVMx4KdtjwQZE9LiVeog9uG5y9vrQf8Cf9OvBagq5KB2WyyDOo 41qUey/EFhsUtVBmokHXXvG7xTX4pUdtpfzlq2/D3SDLyzmWTtdWH2ugwHm+3mNVXxz Hkz85JIt9VRN745mztCJj8VlddReLmhsto+t6Oz8= Received: from localhost.localdomain (113.116.50.122 [113.116.50.122]) by mx.zoho.com.cn with SMTPS id 1573996831319973.1883777334837; Sun, 17 Nov 2019 21:20:31 +0800 (CST) From: Chengguang Xu To: jack@suse.com Cc: linux-kernel@vger.kernel.org, Chengguang Xu Message-ID: <20191117132028.19564-1-cgxu519@mykernel.net> Subject: [PATCH] quota: remove unnecessary check in dquot_add_inodes() and dquot_add_space() Date: Sun, 17 Nov 2019 21:20:28 +0800 X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoCNMailClient: External Content-Type: text/plain; charset=utf8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org After passed grace time we treat softlimit as hardlimit, so we don't have to compare desire usage with softlimit in this place. Signed-off-by: Chengguang Xu --- fs/quota/dquot.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index 6e826b454082..97740077afac 100644 --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c @@ -1283,7 +1283,6 @@ static int dquot_add_inodes(struct dquot *dquot, qsiz= e_t inodes, =09} =20 =09if (dquot->dq_dqb.dqb_isoftlimit && -=09 newinodes > dquot->dq_dqb.dqb_isoftlimit && =09 dquot->dq_dqb.dqb_itime && =09 ktime_get_real_seconds() >=3D dquot->dq_dqb.dqb_itime && !ignore_hardlimit(dquot)) { @@ -1333,7 +1332,6 @@ static int dquot_add_space(struct dquot *dquot, qsize= _t space, =09} =20 =09if (dquot->dq_dqb.dqb_bsoftlimit && -=09 tspace > dquot->dq_dqb.dqb_bsoftlimit && =09 dquot->dq_dqb.dqb_btime && =09 ktime_get_real_seconds() >=3D dquot->dq_dqb.dqb_btime && !ignore_hardlimit(dquot)) { --=20 2.21.0