android_kernel_oneplus_msm8998/fs/gfs2
Andreas Gruenbacher 00112fda08 gfs2: Put bitmap buffers in put_super
commit 10283ea525d30f2e99828978fd04d8427876a7ad upstream.

gfs2_put_super calls gfs2_clear_rgrpd to destroy the gfs2_rgrpd objects
attached to the resource group glocks.  That function should release the
buffers attached to the gfs2_bitmap objects (bi_bh), but the call to
gfs2_rgrp_brelse for doing that is missing.

When gfs2_releasepage later runs across these buffers which are still
referenced, it refuses to free them.  This causes the pages the buffers
are attached to to remain referenced as well.  With enough mount/unmount
cycles, the system will eventually run out of memory.

Fix this by adding the missing call to gfs2_rgrp_brelse in
gfs2_clear_rgrpd.

(Also fix a gfs2_rgrp_relse -> gfs2_rgrp_brelse typo in a comment.)

Fixes: 39b0f1e929 ("GFS2: Don't brelse rgrp buffer_heads every allocation")
Cc: stable@vger.kernel.org # v4.4
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2018-11-27 16:08:01 +01:00
..
acl.c posix_acl: Clear SGID bit when setting file permissions 2016-10-31 04:13:58 -06:00
acl.h
aops.c GFS2: merge window 2015-06-27 09:47:46 -07:00
bmap.c gfs2: Special-case rindex for gfs2_grow 2018-09-26 08:35:05 +02:00
bmap.h
dentry.c
dir.c gfs2: avoid uninitialized variable warning 2017-04-30 05:49:28 +02:00
dir.h
export.c
file.c gfs2: Fix fallocate chunk size 2018-05-30 07:49:13 +02:00
gfs2.h
glock.c GFS2: Fix reference to ERR_PTR in gfs2_glock_iter_next 2017-10-08 10:14:16 +02:00
glock.h gfs2: Remove gl_spin define 2015-10-29 12:57:48 -05:00
glops.c gfs2: Remove gl_spin define 2015-10-29 12:57:48 -05:00
glops.h
incore.h gfs2: Fix glock rhashtable rcu bug 2017-07-15 11:57:46 +02:00
inode.c GFS2: merge window 2015-06-27 09:47:46 -07:00
inode.h
Kconfig
lock_dlm.c remove abs64() 2015-11-09 15:11:24 -08:00
log.c
log.h
lops.c GFS2: merge window 2015-09-11 12:23:51 -07:00
lops.h
main.c gfs2: Remove gl_spin define 2015-10-29 12:57:48 -05:00
Makefile
meta_io.c GFS2: Move glock superblock pointer to field gl_name 2015-09-03 13:33:09 -05:00
meta_io.h GFS2: Move glock superblock pointer to field gl_name 2015-09-03 13:33:09 -05:00
ops_fstype.c gfs2_meta: ->mount() can get NULL dev_name 2018-11-21 09:27:34 +01:00
quota.c GFS2: Move glock superblock pointer to field gl_name 2015-09-03 13:33:09 -05:00
quota.h gfs2: Fix fallocate chunk size 2018-05-30 07:49:13 +02:00
recovery.c
recovery.h
rgrp.c gfs2: Put bitmap buffers in put_super 2018-11-27 16:08:01 +01:00
rgrp.h GFS2: Don't brelse rgrp buffer_heads every allocation 2015-06-19 07:40:22 -05:00
super.c fs: create and use seq_show_option for escaping 2015-09-04 16:54:41 -07:00
super.h
sys.c
sys.h
trace_gfs2.h gfs2: Make statistics unsigned, suitable for use with do_div() 2015-09-03 13:33:32 -05:00
trans.c gfs2: Add missing else in trans_add_meta/data 2015-10-01 12:00:59 -05:00
trans.h
util.c
util.h
xattr.c xattr handlers: Pass handler to operations instead of flags 2015-11-13 20:34:32 -05:00
xattr.h