gfs2: Clean up freeing struct gfs2_sbd
authorAndreas Gruenbacher <agruenba@redhat.com>
Thu, 16 May 2019 21:46:30 +0000 (22:46 +0100)
committerAndreas Gruenbacher <agruenba@redhat.com>
Thu, 27 Jun 2019 18:53:45 +0000 (20:53 +0200)
commit2a27b755ed244527df845f07f4dd83988a90f2e4
tree514a0b34f5509029336314c82f6be5ad07f7ee35
parent4b972a01a7da614b4796475f933094751a295a2f
gfs2: Clean up freeing struct gfs2_sbd

Add a free_sbd function for freeing a struct gfs2_sbd.  Use that for
freeing a super-block descriptor, either directly or via kobject_put.
Free sd_lkstats inside the kobject release function: that way,
gfs2_put_super will no longer leak sd_lkstats.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/ops_fstype.c
fs/gfs2/super.h
fs/gfs2/sys.c