Hi Andreas, On Mon, Jun 12, 2023 at 12:33 PM Andreas Gruenbacher <agrue...@redhat.com> wrote: ... > > @@ -152,24 +151,18 @@ static void signal_our_withdraw(struct gfs2_sbd *sdp) > */ > clear_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags); > if (!sb_rdonly(sdp->sd_vfs)) { > - struct gfs2_holder freeze_gh; > - > - gfs2_holder_mark_uninitialized(&freeze_gh); > - if (sdp->sd_freeze_gl && > - !gfs2_glock_is_locked_by_me(sdp->sd_freeze_gl)) { > - ret = gfs2_freeze_lock_shared(sdp, &freeze_gh, > - log_write_allowed ? 0 : LM_FLAG_TRY); > - if (ret == GLR_TRYFAILED) > - ret = 0; > - } > - if (!ret) > - gfs2_make_fs_ro(sdp); > + bool locked = mutex_trylock(&sdp->sd_freeze_mutex); > + > + gfs2_make_fs_ro(sdp); > + > + if (locked) > + mutex_unlock(&sdp->sd_freeze_mutex);
I am not sure if I overlooked something here, for me it looks like the application does not care about if sd_freeze_mutex is locked or not because the introduced locked boolean will never be evaluated? What am I missing here? - Alex