Message ID | 20230628132155.1560425-8-libaokun1@huawei.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp8929932vqr; Wed, 28 Jun 2023 06:33:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6VIHYf7P1rFlvdYMkka9iAPPjB2xrsz6RyQyQ+8UqgnpIw2Yo6eL7cru3Fy5zcP6w6bEgd X-Received: by 2002:a17:906:d54f:b0:988:a632:774a with SMTP id cr15-20020a170906d54f00b00988a632774amr29598520ejc.27.1687959210999; Wed, 28 Jun 2023 06:33:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687959210; cv=none; d=google.com; s=arc-20160816; b=wavLmN4pCAB+Np1UVmI8+Ba9oG449oLivd2NNUrAkS5PpSTJwSbMqA52FtZmL7StC1 oQVnbuY2alMALwEow17ZgVP1JtHS+BmiPcpjh73tJgscwBCxGBH3cVXIdw9stVX8O1+Q yGe3/0RUksZQMsh5+W8hQ1FcrwkSbAySK1d/UnXQHaCc6ZERqBbiCKAfnj1Z+YKiWPTG gtAea71jVlngcZ8eH8+8aNRUdJ1wgiw9RGihZ4/6LLcDr08xOBYQGebhwhQUHTqUawfD aN9OsrOkdsY1qOsRBtcNH0D+ZQaeiokqGtjC6XPfavhhzXP4rL7aX1pa+OsTbhe4fUlQ 7wFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=sYSGB8NCYjsxRu8ixzbNw2/WUnqu2xWIu37z6UfHp78=; fh=fHzCyx2lgDg5rzxkd+fn4L1zIOfYfCj3lN8BN24cVWY=; b=rUJHYfF9SBCSBPkA+TX/+AsJmxVNIXGiMq0MwcLl2HY66tM41bb3a1FAw4iIx4H9TV xmOiE4uKaqRiQpu5pZuL59qB5qS4kE+Wcx7jMa0hWAVHhdzcmB7mVbFr77Vuq0gf4dBF 5w9iDLJRHzghQpqAi53aR4lY139gIM8dqwS7Nbfg5TJCIEGHUEo2QQU3R9RZkujTMNq+ fTpVVjzyIXfXBmZ9AamnpquBwxIh+veJSlLtdAMJ5NdXfo587xEz+koKn29NXDV6Cw9O FxMLw89yBJNNu5APLI1++uhmqQa1GtB+pflpLjEzUGLSD5hiJ+peF+ly/aOCmaSdu6rH 1+RA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e9-20020a1709062c0900b00983f499fbd7si5386281ejh.836.2023.06.28.06.33.03; Wed, 28 Jun 2023 06:33:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232116AbjF1NYw (ORCPT <rfc822;adanhawthorn@gmail.com> + 99 others); Wed, 28 Jun 2023 09:24:52 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:21999 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231869AbjF1NYW (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 28 Jun 2023 09:24:22 -0400 Received: from dggpeml500021.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Qrj0H48qjzlWNs; Wed, 28 Jun 2023 21:21:35 +0800 (CST) Received: from huawei.com (10.175.127.227) by dggpeml500021.china.huawei.com (7.185.36.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Wed, 28 Jun 2023 21:24:19 +0800 From: Baokun Li <libaokun1@huawei.com> To: <jack@suse.cz> CC: <linux-fsdevel@vger.kernel.org>, <linux-ext4@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <yi.zhang@huawei.com>, <yangerkun@huawei.com>, <chengzhihao1@huawei.com>, <yukuai3@huawei.com>, <libaokun1@huawei.com> Subject: [PATCH v2 7/7] quota: remove unused function put_dquot_list() Date: Wed, 28 Jun 2023 21:21:55 +0800 Message-ID: <20230628132155.1560425-8-libaokun1@huawei.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230628132155.1560425-1-libaokun1@huawei.com> References: <20230628132155.1560425-1-libaokun1@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.127.227] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpeml500021.china.huawei.com (7.185.36.21) X-CFilter-Loop: Reflected Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769953517143367334?= X-GMAIL-MSGID: =?utf-8?q?1769953517143367334?= |
Series |
quota: fix race condition between dqput() and dquot_mark_dquot_dirty()
|
|
Commit Message
Baokun Li
June 28, 2023, 1:21 p.m. UTC
Now that no one is calling put_dquot_list(), remove it.
Signed-off-by: Baokun Li <libaokun1@huawei.com>
---
fs/quota/dquot.c | 20 --------------------
1 file changed, 20 deletions(-)
Comments
On Wed 28-06-23 21:21:55, Baokun Li wrote: > Now that no one is calling put_dquot_list(), remove it. > > Signed-off-by: Baokun Li <libaokun1@huawei.com> I guess you can merge this with patch 6. When there was only a single user, there's no good reason to separate the removal of the unused function... Honza > --- > fs/quota/dquot.c | 20 -------------------- > 1 file changed, 20 deletions(-) > > diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c > index df028fb2ce72..ba0125473be3 100644 > --- a/fs/quota/dquot.c > +++ b/fs/quota/dquot.c > @@ -1102,26 +1102,6 @@ static void remove_inode_dquot_ref(struct inode *inode, int type) > dqput(dquot); > } > > -/* > - * Free list of dquots > - * Dquots are removed from inodes and no new references can be got so we are > - * the only ones holding reference > - */ > -static void put_dquot_list(struct list_head *tofree_head) > -{ > - struct list_head *act_head; > - struct dquot *dquot; > - > - act_head = tofree_head->next; > - while (act_head != tofree_head) { > - dquot = list_entry(act_head, struct dquot, dq_free); > - act_head = act_head->next; > - /* Remove dquot from the list so we won't have problems... */ > - list_del_init(&dquot->dq_free); > - dqput(dquot); > - } > -} > - > static void remove_dquot_ref(struct super_block *sb, int type) > { > struct inode *inode; > -- > 2.31.1 >
On 2023/6/29 19:05, Jan Kara wrote: > On Wed 28-06-23 21:21:55, Baokun Li wrote: >> Now that no one is calling put_dquot_list(), remove it. >> >> Signed-off-by: Baokun Li <libaokun1@huawei.com> > I guess you can merge this with patch 6. When there was only a single user, > there's no good reason to separate the removal of the unused function... > > Honza I got a warning when I compiled after I finished patch 6, and then there was this patch. I will merge this patch into patch 6 in the next version. >> --- >> fs/quota/dquot.c | 20 -------------------- >> 1 file changed, 20 deletions(-) >> >> diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c >> index df028fb2ce72..ba0125473be3 100644 >> --- a/fs/quota/dquot.c >> +++ b/fs/quota/dquot.c >> @@ -1102,26 +1102,6 @@ static void remove_inode_dquot_ref(struct inode *inode, int type) >> dqput(dquot); >> } >> >> -/* >> - * Free list of dquots >> - * Dquots are removed from inodes and no new references can be got so we are >> - * the only ones holding reference >> - */ >> -static void put_dquot_list(struct list_head *tofree_head) >> -{ >> - struct list_head *act_head; >> - struct dquot *dquot; >> - >> - act_head = tofree_head->next; >> - while (act_head != tofree_head) { >> - dquot = list_entry(act_head, struct dquot, dq_free); >> - act_head = act_head->next; >> - /* Remove dquot from the list so we won't have problems... */ >> - list_del_init(&dquot->dq_free); >> - dqput(dquot); >> - } >> -} >> - >> static void remove_dquot_ref(struct super_block *sb, int type) >> { >> struct inode *inode; >> -- >> 2.31.1 >> Thanks!
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index df028fb2ce72..ba0125473be3 100644 --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c @@ -1102,26 +1102,6 @@ static void remove_inode_dquot_ref(struct inode *inode, int type) dqput(dquot); } -/* - * Free list of dquots - * Dquots are removed from inodes and no new references can be got so we are - * the only ones holding reference - */ -static void put_dquot_list(struct list_head *tofree_head) -{ - struct list_head *act_head; - struct dquot *dquot; - - act_head = tofree_head->next; - while (act_head != tofree_head) { - dquot = list_entry(act_head, struct dquot, dq_free); - act_head = act_head->next; - /* Remove dquot from the list so we won't have problems... */ - list_del_init(&dquot->dq_free); - dqput(dquot); - } -} - static void remove_dquot_ref(struct super_block *sb, int type) { struct inode *inode;