]> git.baikalelectronics.ru Git - kernel.git/commit
gfs2: Prevent double iput for journal on error
authorBob Peterson <rpeterso@redhat.com>
Thu, 18 Aug 2022 18:32:36 +0000 (13:32 -0500)
committerAndreas Gruenbacher <agruenba@redhat.com>
Thu, 25 Aug 2022 15:10:59 +0000 (17:10 +0200)
commitf7a270d9e4e13e1cf5a51de1ac19ba722c4e67e1
tree87c33d5a8aff04a8e114e280fd14d139f2029416
parente0d97135581f3ec8210158eea3eb7299c86ece66
gfs2: Prevent double iput for journal on error

When a gfs2 file system is withdrawn it does iput on its journal to
allow recovery from another cluster node. If it's unable to get a
replacement inode for whatever reason, the journal descriptor would
still be pointing at the evicted inode. So when unmount clears out the
list of journals, it would do a second iput referencing the pointer.
To avoid this, set the inode pointer to NULL.

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