gfs2: ignore rindex_update failure in dinode_dealloc
authorBob Peterson <rpeterso@redhat.com>
Thu, 4 May 2023 17:43:22 +0000 (13:43 -0400)
committerAndreas Gruenbacher <agruenba@redhat.com>
Tue, 6 Jun 2023 16:35:06 +0000 (18:35 +0200)
commit9b620429eca9a1dbadf6cf983b11d2cb427411ce
tree2a82476c0f531babace3ada208e6bd4a4f83c6cc
parente4f82bf21f2586aa823fd40de72023236062a4aa
gfs2: ignore rindex_update failure in dinode_dealloc

Before this patch, function gfs2_dinode_dealloc would abort if it got a
bad return code from gfs2_rindex_update(). The problem is that it left the
dinode in the unlinked (not free) state, which meant subsequent fsck
would clean it up and flag an error. That meant some of our QE tests
would fail.

The sole purpose of gfs2_rindex_update(), in this code path, is to read in
any newer rgrps added by gfs2_grow. But since this is a delete operation
it won't actually use any of those new rgrps. It can really only twiddle
the bits from "Unlinked" to "Free" in an existing rgrp. Therefore the
error should not prevent the transition from unlinked to free.

This patch makes gfs2_dinode_dealloc ignore the bad return code and
proceed with freeing the dinode so the QE tests will not be tripped up.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/super.c