diff options
author | Bob Peterson <rpeterso@redhat.com> | 2019-05-22 09:21:21 -0500 |
---|---|---|
committer | Bob Peterson <rpeterso@redhat.com> | 2020-02-27 07:53:17 -0600 |
commit | 33dbd1e41a1dd549eb19a29477119d4e29766210 (patch) | |
tree | 16feec8a70ce9c7a0a24bb317c0cd8bb19564de4 /fs/gfs2/glops.c | |
parent | 601ef0d52e9617588fcff3df26953592f2eb44ac (diff) |
gfs2: fix infinite loop when checking ail item count before go_inval
Before this patch, the rgrp_go_inval and inode_go_inval functions each
checked if there were any items left on the ail count (by way of a
count), and if so, did a withdraw. But the withdraw code now uses
glocks when changing the file system to read-only status. So we can
not have glock functions withdrawing or a hang will likely result:
The glocks can't be serviced by the work_func if the work_func is
busy doing its own withdraw.
This patch removes the checks from the go_inval functions and adds
a centralized check in do_xmote to warn about the problem and not
withdraw, but flag the error so it's eventually caught when the logd
daemon eventually runs.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Reviewed-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2/glops.c')
-rw-r--r-- | fs/gfs2/glops.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c index 7cfacbe35e59..b58924482d9a 100644 --- a/fs/gfs2/glops.c +++ b/fs/gfs2/glops.c @@ -188,7 +188,6 @@ static void rgrp_go_inval(struct gfs2_glock *gl, int flags) gfs2_rgrp_brelse(rgd); WARN_ON_ONCE(!(flags & DIO_METADATA)); - gfs2_assert_withdraw(sdp, !atomic_read(&gl->gl_ail_count)); truncate_inode_pages_range(mapping, gl->gl_vm.start, gl->gl_vm.end); if (rgd) @@ -288,8 +287,6 @@ static void inode_go_inval(struct gfs2_glock *gl, int flags) { struct gfs2_inode *ip = gfs2_glock2inode(gl); - gfs2_assert_withdraw(gl->gl_name.ln_sbd, !atomic_read(&gl->gl_ail_count)); - if (flags & DIO_METADATA) { struct address_space *mapping = gfs2_glock2aspace(gl); truncate_inode_pages(mapping, 0); |