Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp9133ybp; Thu, 3 Oct 2019 09:26:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqyqim9b288EK8kYHOn2SsRrjSVRf5jOHyeEUM6hHDdh/DIJxg1kfRpJF+Xa2JnoeTI+eeLv X-Received: by 2002:a50:d089:: with SMTP id v9mr10737967edd.54.1570120011929; Thu, 03 Oct 2019 09:26:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570120011; cv=none; d=google.com; s=arc-20160816; b=v49w9kJAfiVtg/u0a4Z4E2UfEwFkrkDyJFwT5wsv2Q1z9Rei4FymzCh7kwZCLKCgJj pMtD2YfO7u+P/9COQRXSNDdom3Y9C0875JPUBddZskdOhJ0/VCYXX8Pp1u1zs9MAnkzN WrPFiVtpafLMsrcLKZ7XTZshGA0BuVZAEAbFe3fJU/IAhdJ4YRyNepomlJ4ZtRz/x2DP WGDtFvbGjc4ORi079tCzbrikwO4OoF7YjdSTu/3dUqoHlMTHGyMMW+zbUmRU0LAPcKd7 DrbgZ96Yp7OktBk1kgC/B+aeNZPhH6fLmEOGVhNIFuovg75aVPLqqhj0t1pbi3AmHSL5 nVBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=FsFpG7XqZ3O0tuNei4tXkVJmiPR3jYqRm4NXeuhrxUE=; b=x5rwW16NhTKHHp2tLmRmx+U6chijnB8GEGYZ1JH0maBKGDeJsVlEi8WnFWzy9+Tabv dkq+oS+Zj9fGaVY7nn28eom+RSliPycdAsE89Z7Wds64yeE1VWsj8fKyiTmA0rRJjLhB aiKlhcHloRuqo6s/kCpO0Dix2LFq7n2X1hp31g0SqLMHmuYOiDWZzFzvPWkiW64IrHDr Ig9w+tv8s6cSiaz9DNxGKODwhlmQiad2Ih5F1r/Bx2N5MTPAbixUS0quNfQ0m+KfeDS+ bDQ18yQe+POmCrX0sU1OuJdHmm0Kzkld8TDJz8g8csqULNmmD87/f3Q0ikbwh5Kn79oN lTfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RQgVZ3Gz; 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 n2si1818871edq.264.2019.10.03.09.26.27; Thu, 03 Oct 2019 09:26:51 -0700 (PDT) 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=@kernel.org header.s=default header.b=RQgVZ3Gz; 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 S2390367AbfJCQWn (ORCPT + 99 others); Thu, 3 Oct 2019 12:22:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:51432 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390347AbfJCQWj (ORCPT ); Thu, 3 Oct 2019 12:22:39 -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 42FD3222BE; Thu, 3 Oct 2019 16:22:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570119758; bh=oMEZALGYqpjAmf3M/soEiS5nERz2JiuJz1YaMlXvuv4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RQgVZ3Gzo+rV9Ve8cCHNAb0aJNagd9ktDhGMpE+g8IVo1094fzUVs8vlo2fNINwvw 9AmQvtLcNXs0aIbe0xbYigNRve4YrSNrhY+bLWEDBv1WSf63QkL34lV0RGHwwQEEQS SuI63+axdroNcNb9jeOW8frczKedOAADasSKBiiU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Bob Peterson , Andreas Gruenbacher Subject: [PATCH 4.19 182/211] gfs2: clear buf_in_tr when ending a transaction in sweep_bh_for_rgrps Date: Thu, 3 Oct 2019 17:54:08 +0200 Message-Id: <20191003154527.528197361@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154447.010950442@linuxfoundation.org> References: <20191003154447.010950442@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bob Peterson commit f0b444b349e33ae0d3dd93e25ca365482a5d17d4 upstream. In function sweep_bh_for_rgrps, which is a helper for punch_hole, it uses variable buf_in_tr to keep track of when it needs to commit pending block frees on a partial delete that overflows the transaction created for the delete. The problem is that the variable was initialized at the start of function sweep_bh_for_rgrps but it was never cleared, even when starting a new transaction. This patch reinitializes the variable when the transaction is ended, so the next transaction starts out with it cleared. Fixes: d552a2b9b33e ("GFS2: Non-recursive delete") Cc: stable@vger.kernel.org # v4.12+ Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher Signed-off-by: Greg Kroah-Hartman --- fs/gfs2/bmap.c | 1 + 1 file changed, 1 insertion(+) --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c @@ -1630,6 +1630,7 @@ out_unlock: brelse(dibh); up_write(&ip->i_rw_mutex); gfs2_trans_end(sdp); + buf_in_tr = false; } gfs2_glock_dq_uninit(rd_gh); cond_resched();