WSL2-Linux-Kernel/fs/gfs2
Andreas Gruenbacher d2ab6689ed gfs2: Fix glock_hash_walk bugs
[ Upstream commit 7427f3bb49 ]

So far, glock_hash_walk took a reference on each glock it iterated over, and it
was the examiner's responsibility to drop those references.  Dropping the final
reference to a glock can sleep and the examiners are called in a RCU critical
section with spin locks held, so examiners that didn't need the extra reference
had to drop it asynchronously via gfs2_glock_queue_put or similar.  This wasn't
done correctly in thaw_glock which did call gfs2_glock_put, and not at all in
dump_glock_func.

Change glock_hash_walk to not take glock references at all.  That way, the
examiners that don't need them won't have to bother with slow asynchronous
puts, and the examiners that do need references can take them themselves.

Reported-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-11-18 19:16:19 +01:00
..
Kconfig
Makefile
acl.c vfs: add rcu argument to ->get_acl() callback 2021-08-18 22:08:24 +02:00
acl.h vfs: add rcu argument to ->get_acl() callback 2021-08-18 22:08:24 +02:00
aops.c gfs2: Don't release and reacquire local statfs bh 2021-08-20 09:03:46 -05:00
aops.h
bmap.c iomap: remove the iomap arguments to ->page_{prepare,done} 2021-08-16 21:26:33 -07:00
bmap.h gfs2: Clean up gfs2_unstuff_dinode 2021-06-29 10:56:51 +02:00
dentry.c
dir.c gfs2: Clean up gfs2_unstuff_dinode 2021-06-29 10:56:51 +02:00
dir.h
export.c
file.c fs: remove mandatory file locking support 2021-08-23 06:15:36 -04:00
gfs2.h
glock.c gfs2: Fix glock_hash_walk bugs 2021-11-18 19:16:19 +01:00
glock.h
glops.c gfs2: Delay withdraw from atomic context 2021-08-20 09:03:46 -05:00
glops.h
incore.h gfs2: Eliminate vestigial HIF_FIRST 2021-08-20 09:03:46 -05:00
inode.c gfs2: Switch to may_setattr in gfs2_setattr 2021-08-13 00:41:05 -04:00
inode.h
lock_dlm.c gfs2: Don't call dlm after protocol is unmounted 2021-08-20 09:03:46 -05:00
log.c gfs2: tiny cleanup in gfs2_log_reserve 2021-08-19 12:31:17 -05:00
log.h gfs2: Clean up revokes on normal withdraws 2021-05-20 13:31:37 +02:00
lops.c gfs2: be more verbose replaying invalid rgrp blocks 2021-08-19 12:31:17 -05:00
lops.h gfs2: Clean up revokes on normal withdraws 2021-05-20 13:31:37 +02:00
main.c
meta_io.c gfs2: don't stop reads while withdraw in progress 2021-08-20 09:03:46 -05:00
meta_io.h
ops_fstype.c gfs2: Mark journal inodes as "don't cache" 2021-08-20 09:03:46 -05:00
quota.c gfs2: Clean up gfs2_unstuff_dinode 2021-06-29 10:56:51 +02:00
quota.h
recovery.c
recovery.h
rgrp.c
rgrp.h
super.c gfs2: nit: gfs2_drop_inode shouldn't return bool 2021-08-20 09:03:46 -05:00
super.h gfs2: Don't release and reacquire local statfs bh 2021-08-20 09:03:46 -05:00
sys.c
sys.h
trace_gfs2.h
trans.c
trans.h
util.c gfs2: Mark journal inodes as "don't cache" 2021-08-20 09:03:46 -05:00
util.h gfs2: don't stop reads while withdraw in progress 2021-08-20 09:03:46 -05:00
xattr.c
xattr.h