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=unavailable 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 3D7C1C433DF for ; Mon, 1 Jun 2020 18:56:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1581620679 for ; Mon, 1 Jun 2020 18:56:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591037814; bh=iNBA+aL+Aoct4d6SGWwMFYk5pSvysVwqN1WSQJrtbTU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=tX9AYT+Mi/bBt1Z3XAaRRQY5BUYl8VzIWw571G7nmE5dSpR+AhluQeYBST+W+BhIW acFFWdUf5odIE21rAxqNoQT4H1S58ZRPUnqbDEHdQ9qpgIfHmfyvZq/zUAi+YJZ0vo 32O+L5JYP0c5mQQkQ1dWoeJPA1IRtchT3gfAEVHA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729997AbgFAS4v (ORCPT ); Mon, 1 Jun 2020 14:56:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:43044 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729628AbgFASAZ (ORCPT ); Mon, 1 Jun 2020 14:00:25 -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 0070B2065C; Mon, 1 Jun 2020 18:00:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591034425; bh=iNBA+aL+Aoct4d6SGWwMFYk5pSvysVwqN1WSQJrtbTU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TK+18x2nuUrDE3Wda9eP1jO2yGikxL9hEq3ZyUPZPMt8kBxRvlmUmNToLXMgT6L4T T9jrIChGN81NBYZq+Pq7pQo57m96AP+jl2Yg7zLblscRZ9P8DvWCWDtR6Ocjc3J4X5 Nu0vpmhASONa3C8ursrTW3LCBpq5AtSIXXk/pRdY= 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 4.14 18/77] gfs2: dont call quota_unhold if quotas are not locked Date: Mon, 1 Jun 2020 19:53:23 +0200 Message-Id: <20200601174019.693551413@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200601174016.396817032@linuxfoundation.org> References: <20200601174016.396817032@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 a833e2e07167..d34a668a432f 100644 --- a/fs/gfs2/quota.c +++ b/fs/gfs2/quota.c @@ -1112,7 +1112,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; @@ -1149,7 +1149,6 @@ void gfs2_quota_unlock(struct gfs2_inode *ip) qd_unlock(qda[x]); } -out: gfs2_quota_unhold(ip); } -- 2.25.1