Bob Peterson fc936fae1b gfs2: clear buf_in_tr when ending a transaction in sweep_bh_for_rgrps
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 <rpeterso@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-05 12:48:08 +02:00
..
2016-05-12 22:28:05 -04:00
2016-06-27 09:47:09 -05:00
2016-06-27 09:47:08 -05:00
2018-05-30 07:52:35 +02:00
2016-08-02 12:05:27 -05:00
2016-06-07 13:41:38 -06:00
2018-05-30 07:52:35 +02:00
2017-04-19 08:25:43 -04:00
2017-08-25 18:47:18 -05:00