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 X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D3EBC433E0 for ; Mon, 1 Jun 2020 18:40:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 70AFF20678 for ; Mon, 1 Jun 2020 18:40:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591036815; bh=/DgzylOsyp9DnIpSDwr09rBAEMLqWYmSe5+ItFRSM0k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=VszyPfH1tFOZNjFcL4N9Kh8tEdK67+I7iAzpDxr1QN8eqYh9c2Hklig28fawG1CD7 dxL6kTJS2Of+BgiRfa0LWQHAqxP6cCIHOP8Q9TyWE7WeLw7sXmLKP8Li5wtaXEm5FK dq/XUy3EEK0dLJsIfrqX4PcmLiXm1QnIiXvSFLw4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728363AbgFASkO (ORCPT ); Mon, 1 Jun 2020 14:40:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:33034 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731344AbgFASNa (ORCPT ); Mon, 1 Jun 2020 14:13:30 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5C80B20776; Mon, 1 Jun 2020 18:13:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591035208; bh=/DgzylOsyp9DnIpSDwr09rBAEMLqWYmSe5+ItFRSM0k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vkDp+RYuiRgsqtnzcoJ0byxy0aLkxKx9npCqZRo1XqB6A+5ychs1ih0/ML7DAXuos H/pbEIFBeLAgcYkikFdv+GHvrzY6oSn9kqYQFP1TByOexGhrNxO+0/tmtjfDgIt8mC FAVcWcZpxtfdgMPq3b2N97Nt5ReEwZ8wZLgGRYbQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Bob Peterson , Andreas Gruenbacher , Sasha Levin Subject: [PATCH 5.6 058/177] gfs2: dont call quota_unhold if quotas are not locked Date: Mon, 1 Jun 2020 19:53:16 +0200 Message-Id: <20200601174053.817405407@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200601174048.468952319@linuxfoundation.org> References: <20200601174048.468952319@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Bob Peterson [ Upstream commit c9cb9e381985bbbe8acd2695bbe6bd24bf06b81c ] Before this patch, function gfs2_quota_unlock checked if quotas are turned off, and if so, it branched to label out, which called gfs2_quota_unhold. With the new system of gfs2_qa_get and put, we no longer want to call gfs2_quota_unhold or we won't balance our gets and puts. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher Signed-off-by: Sasha Levin --- fs/gfs2/quota.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c index 832d44782f74..a80b638b582e 100644 --- a/fs/gfs2/quota.c +++ b/fs/gfs2/quota.c @@ -1113,7 +1113,7 @@ void gfs2_quota_unlock(struct gfs2_inode *ip) int found; if (!test_and_clear_bit(GIF_QD_LOCKED, &ip->i_flags)) - goto out; + return; for (x = 0; x < ip->i_qadata->qa_qd_num; x++) { struct gfs2_quota_data *qd; @@ -1150,7 +1150,6 @@ void gfs2_quota_unlock(struct gfs2_inode *ip) qd_unlock(qda[x]); } -out: gfs2_quota_unhold(ip); } -- 2.25.1