Andreas Gruenbacher fd3b7e07d3 gfs2: Recursive gfs2_quota_hold in gfs2_iomap_end
commit 7009fa9cd9a5262944b30eb7efb1f0561d074b68 upstream.

When starting an iomap write, gfs2_quota_lock_check -> gfs2_quota_lock
-> gfs2_quota_hold is called from gfs2_iomap_begin.  At the end of the
write, before unlocking the quotas, punch_hole -> gfs2_quota_hold can be
called again in gfs2_iomap_end, which is incorrect and leads to a failed
assertion.  Instead, move the call to gfs2_quota_unlock before the call
to punch_hole to fix that.

Fixes: 64bc06bb32ee ("gfs2: iomap buffered write support")
Cc: stable@vger.kernel.org # v4.19+
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-04 10:26:51 +01:00
..
2019-07-03 14:45:18 +02:00
2020-02-11 04:35:35 -08:00
2019-09-04 20:22:17 +02:00
2020-06-17 16:40:21 +02:00
2019-06-08 12:52:42 -07:00
2019-09-18 22:47:05 -04:00
2019-09-03 09:42:41 +02:00