kernel_optimize_test/fs/gfs2
Bob Peterson d11e5b96ef gfs2: fix scheduling while atomic bug in glocks
commit 20265d9a67e40eafd39a8884658ca2e36f05985d upstream.

Before this patch, in the unlikely event that gfs2_glock_dq encountered
a withdraw, it would do a wait_on_bit to wait for its journal to be
recovered, but it never released the glock's spin_lock, which caused a
scheduling-while-atomic error.

This patch unlocks the lockref spin_lock before waiting for recovery.

Fixes: 601ef0d52e ("gfs2: Force withdraw to replay journals and wait for it to finish")
Cc: stable@vger.kernel.org # v5.7+
Reported-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-10 13:39:25 +02:00
..
acl.c
acl.h
aops.c
aops.h
bmap.c gfs2: Recursive gfs2_quota_hold in gfs2_iomap_end 2021-03-04 11:38:44 +01:00
bmap.h
dentry.c
dir.c
dir.h
export.c
file.c
gfs2.h
glock.c gfs2: fix scheduling while atomic bug in glocks 2021-06-10 13:39:25 +02:00
glock.h
glops.c gfs2: Don't freeze the file system during unmount 2020-11-25 18:12:08 +01:00
glops.h
incore.h
inode.c gfs2: Fix deadlock between gfs2_{create_inode,inode_lookup} and delete_work_func 2020-12-01 00:21:10 +01:00
inode.h
Kconfig
lock_dlm.c gfs2: Don't skip dlm unlock if glock has an lvb 2021-03-04 11:38:43 +01:00
log.c gfs2: fix use-after-free in trans_drain 2021-03-30 14:31:49 +02:00
log.h
lops.c
lops.h
main.c
Makefile
meta_io.c
meta_io.h
ops_fstype.c gfs2: move freeze glock outside the make_fs_rw and _ro functions 2021-03-25 09:04:14 +01:00
quota.c
quota.h
recovery.c gfs2: Add common helper for holding and releasing the freeze glock 2021-03-25 09:04:14 +01:00
recovery.h
rgrp.c gfs2: check for empty rgrp tree in gfs2_ri_update 2020-11-25 18:10:55 +01:00
rgrp.h
super.c gfs2: report "already frozen/thawed" errors 2021-04-16 11:43:20 +02:00
super.h
sys.c
sys.h
trace_gfs2.h
trans.c gfs2: fix use-after-free in trans_drain 2021-03-30 14:31:49 +02:00
trans.h
util.c gfs2: bypass signal_our_withdraw if no journal 2021-03-25 09:04:14 +01:00
util.h gfs2: Add common helper for holding and releasing the freeze glock 2021-03-25 09:04:14 +01:00
xattr.c
xattr.h