diff options
author | Bob Peterson <rpeterso@redhat.com> | 2020-12-22 14:43:28 -0600 |
---|---|---|
committer | Andreas Gruenbacher <agruenba@redhat.com> | 2020-12-23 00:54:21 +0100 |
commit | 96b1454f2e8ede4c619fde405a1bb4e9ba8d218e (patch) | |
tree | ec254d75a0d52a626cf0b2da1eb769d381566275 /crypto/cfb.c | |
parent | c77b52c0a137994ad796f44544c802b0b766e496 (diff) | |
download | linux-96b1454f2e8ede4c619fde405a1bb4e9ba8d218e.tar.gz linux-96b1454f2e8ede4c619fde405a1bb4e9ba8d218e.tar.bz2 linux-96b1454f2e8ede4c619fde405a1bb4e9ba8d218e.zip |
gfs2: move freeze glock outside the make_fs_rw and _ro functions
Before this patch, sister functions gfs2_make_fs_rw and gfs2_make_fs_ro locked
(held) the freeze glock by calling gfs2_freeze_lock and gfs2_freeze_unlock.
The problem is, not all the callers of gfs2_make_fs_ro should be doing this.
The three callers of gfs2_make_fs_ro are: remount (gfs2_reconfigure),
signal_our_withdraw, and unmount (gfs2_put_super). But when unmounting the
file system we can get into the following circular lock dependency:
deactivate_super
down_write(&s->s_umount); <-------------------------------------- s_umount
deactivate_locked_super
gfs2_kill_sb
kill_block_super
generic_shutdown_super
gfs2_put_super
gfs2_make_fs_ro
gfs2_glock_nq_init sd_freeze_gl
freeze_go_sync
if (freeze glock in SH)
freeze_super (vfs)
down_write(&sb->s_umount); <------- s_umount
This patch moves the hold of the freeze glock outside the two sister rw/ro
functions to their callers, but it doesn't request the glock from
gfs2_put_super, thus eliminating the circular dependency.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'crypto/cfb.c')
0 files changed, 0 insertions, 0 deletions