From: Bob Peterson Date: Fri, 30 Jul 2021 18:23:49 +0000 (-0500) Subject: gfs2: Delay withdraw from atomic context X-Git-Tag: v5.15-rc1~179^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fffe9bee14b0e04ef632b96279fa44cb3df80812;p=thirdparty%2Fkernel%2Fstable.git gfs2: Delay withdraw from atomic context Before this patch, if function __gfs2_ail_flush detected an error syncing the ail list, it call gfs2_ail_error which called gfs2_withdraw. Since __gfs2_ail_flush deals with a specific glock, we shouldn't withdraw immediately because the withdraw code (signal_our_withdraw) uses glocks in its processing. This patch changes the call from gfs2_withdraw to gfs2_withdraw_delayed which defers the withdraw until a more appropriate context, such as the logd daemon, discovers the intent to withdraw. Reported-by: Dan Carpenter Signed-off-by: Bob Peterson --- diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c index 5fbdc7e9f4ff2..79c621c7863d2 100644 --- a/fs/gfs2/glops.c +++ b/fs/gfs2/glops.c @@ -44,7 +44,7 @@ static void gfs2_ail_error(struct gfs2_glock *gl, const struct buffer_head *bh) gl->gl_name.ln_type, gl->gl_name.ln_number, gfs2_glock2aspace(gl)); gfs2_lm(sdp, "AIL error\n"); - gfs2_withdraw(sdp); + gfs2_withdraw_delayed(sdp); } /**