From: Bob Peterson Date: Thu, 27 Feb 2020 08:57:27 -0500 (EST) Subject: [Cluster-devel] [bug report] gfs2: Force withdraw to replay journals and wait for it to finish In-Reply-To: <20200227053842.4wthay5evgb4tlap@kili.mountain> References: <20200227053842.4wthay5evgb4tlap@kili.mountain> Message-ID: <1689115571.11050129.1582811847602.JavaMail.zimbra@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit ----- Original Message ----- > Hello Bob Peterson, > > This is a semi-automatic email about new static checker warnings. > > The patch f4e8da521747: "gfs2: Force withdraw to replay journals and > wait for it to finish" from Jan 28, 2020, leads to the following > Smatch complaint: > > fs/gfs2/util.c:135 signal_our_withdraw() > error: we previously assumed 'sdp->sd_vfs' could be null (see line 119) > > fs/gfs2/util.c > 118 clear_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags); > 119 if (sdp->sd_vfs && !sb_rdonly(sdp->sd_vfs)) > ^^^^^^^^^^^ > Patch adds check > > 120 ret = gfs2_make_fs_ro(sdp); > 121 > 122 /* > 123 * Drop the glock for our journal so another node can recover it. > 124 */ > 125 if (gfs2_holder_initialized(&sdp->sd_journal_gh)) { > 126 gfs2_glock_dq_wait(&sdp->sd_journal_gh); > 127 gfs2_holder_uninit(&sdp->sd_journal_gh); > 128 } > 129 sdp->sd_jinode_gh.gh_flags |= GL_NOCACHE; > 130 gfs2_glock_dq(&sdp->sd_jinode_gh); > 131 if (test_bit(SDF_FS_FROZEN, &sdp->sd_flags)) { > 132 /* Make sure gfs2_unfreeze works if partially-frozen */ > 133 flush_workqueue(gfs2_freeze_wq); > 134 atomic_set(&sdp->sd_freeze_state, SFS_FROZEN); > 135 thaw_super(sdp->sd_vfs); > ^^^^^^^^^^^^^^^^^^^^^^^ > And unchecked dereference as well inside the thaw_super() function. > > 136 } else { > 137 wait_on_bit(&gl->gl_flags, GLF_DEMOTE, TASK_UNINTERRUPTIBLE); > > regards, > dan carpenter Hi, Thanks. I fixed it. Bob Peterson