GFS2: Clear gl_object when deleting an inode in gfs2_delete_inode
authorBob Peterson <rpeterso@redhat.com>
Tue, 18 Jul 2017 17:36:01 +0000 (12:36 -0500)
committerBob Peterson <rpeterso@redhat.com>
Wed, 9 Aug 2017 14:36:38 +0000 (09:36 -0500)
commit240c6235dfe4fe46f2fd0f2b3c15b3a22100a75e
treed619273688a72fd0a28badeb5912e35a84566a29
parent9c1b28081f43c0f14ccbcad02a6e0f227c072da2
GFS2: Clear gl_object when deleting an inode in gfs2_delete_inode

This patch adds some calls to clear gl_object in function
gfs2_delete_inode. Since we are deleting the inode, and the glock
typically outlives the inode in core, we must clear gl_object
so subsequent use of the glock (e.g. for a new inode in its place)
will not have the old pointer sitting there. In error cases we
need to tidy up after ourselves. In non-error cases, we need to
clear gl_object before we set the block free in the bitmap so
residules aren't left for potential inode creators.

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