···435435 error = mpage_read_folio(folio, gfs2_block_map);436436 }437437438438- if (gfs2_withdrawing_or_withdrawn(sdp))438438+ if (gfs2_withdrawn(sdp))439439 return -EIO;440440441441 return error;
+1-1
fs/gfs2/file.c
···1446144614471447 if (!(fl->c.flc_flags & FL_POSIX))14481448 return -ENOLCK;14491449- if (gfs2_withdrawing_or_withdrawn(sdp)) {14491449+ if (gfs2_withdrawn(sdp)) {14501450 if (lock_is_unlock(fl))14511451 locks_lock_file_wait(file, fl);14521452 return -EIO;
+4-4
fs/gfs2/glock.c
···154154{155155 struct gfs2_sbd *sdp = gl->gl_name.ln_sbd;156156157157- if (!gfs2_withdrawing_or_withdrawn(sdp))157157+ if (!gfs2_withdrawn(sdp))158158 return false;159159 if (gl->gl_ops->go_flags & GLOF_NONDISK)160160 return false;···270270 GLOCK_BUG_ON(gl, !list_empty(&gl->gl_holders));271271 if (mapping) {272272 truncate_inode_pages_final(mapping);273273- if (!gfs2_withdrawing_or_withdrawn(sdp))273273+ if (!gfs2_withdrawn(sdp))274274 GLOCK_BUG_ON(gl, !mapping_empty(mapping));275275 }276276 trace_gfs2_glock_put(gl);···755755 * gfs2_gl_hash_clear calls clear_glock) and recovery is complete756756 * then it's okay to tell dlm to unlock it.757757 */758758- if (unlikely(sdp->sd_log_error) && !gfs2_withdrawing_or_withdrawn(sdp))758758+ if (unlikely(sdp->sd_log_error) && !gfs2_withdrawn(sdp))759759 gfs2_withdraw(sdp);760760 if (glock_blocked_by_withdraw(gl) &&761761 (target != LM_ST_UNLOCKED ||···803803 */804804 } else {805805 fs_err(sdp, "lm_lock ret %d\n", ret);806806- GLOCK_BUG_ON(gl, !gfs2_withdrawing_or_withdrawn(sdp));806806+ GLOCK_BUG_ON(gl, !gfs2_withdrawn(sdp));807807 return;808808 }809809 }
···11951195 struct gfs2_sbd *sdp = arg;11961196 struct lm_lockstruct *ls = &sdp->sd_lockstruct;1197119711981198- if (gfs2_withdrawing_or_withdrawn(sdp)) {11981198+ if (gfs2_withdrawn(sdp)) {11991199 fs_err(sdp, "recover_prep ignored due to withdraw.\n");12001200 return;12011201 }···12211221 struct lm_lockstruct *ls = &sdp->sd_lockstruct;12221222 int jid = slot->slot - 1;1223122312241224- if (gfs2_withdrawing_or_withdrawn(sdp)) {12241224+ if (gfs2_withdrawn(sdp)) {12251225 fs_err(sdp, "recover_slot jid %d ignored due to withdraw.\n",12261226 jid);12271227 return;···12501250 struct gfs2_sbd *sdp = arg;12511251 struct lm_lockstruct *ls = &sdp->sd_lockstruct;1252125212531253- if (gfs2_withdrawing_or_withdrawn(sdp)) {12531253+ if (gfs2_withdrawn(sdp)) {12541254 fs_err(sdp, "recover_done ignored due to withdraw.\n");12551255 return;12561256 }···12811281{12821282 struct lm_lockstruct *ls = &sdp->sd_lockstruct;1283128312841284- if (gfs2_withdrawing_or_withdrawn(sdp)) {12841284+ if (gfs2_withdrawn(sdp)) {12851285 fs_err(sdp, "recovery_result jid %d ignored due to withdraw.\n",12861286 jid);12871287 return;
+11-11
fs/gfs2/log.c
···118118 }119119 }120120121121- if (gfs2_withdrawing_or_withdrawn(sdp)) {121121+ if (gfs2_withdrawn(sdp)) {122122 gfs2_remove_from_ail(bd);123123 continue;124124 }···834834 struct super_block *sb = sdp->sd_vfs;835835 u64 dblock;836836837837- if (gfs2_withdrawing_or_withdrawn(sdp))837837+ if (gfs2_withdrawn(sdp))838838 return;839839840840 page = mempool_alloc(gfs2_page_pool, GFP_NOIO);···981981 gfs2_ail1_wait(sdp);982982 empty = gfs2_ail1_empty(sdp, 0);983983984984- if (gfs2_withdrawing_or_withdrawn(sdp))984984+ if (gfs2_withdrawn(sdp))985985 break;986986 }987987}···10441044 * Do this check while holding the log_flush_lock to prevent new10451045 * buffers from being added to the ail via gfs2_pin()10461046 */10471047- if (gfs2_withdrawing_or_withdrawn(sdp) ||10471047+ if (gfs2_withdrawn(sdp) ||10481048 !test_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags))10491049 goto out;10501050···10941094 goto out_withdraw;1095109510961096 gfs2_ordered_write(sdp);10971097- if (gfs2_withdrawing_or_withdrawn(sdp))10971097+ if (gfs2_withdrawn(sdp))10981098 goto out_withdraw;10991099 lops_before_commit(sdp, tr);11001100- if (gfs2_withdrawing_or_withdrawn(sdp))11001100+ if (gfs2_withdrawn(sdp))11011101 goto out_withdraw;11021102 if (sdp->sd_jdesc)11031103 gfs2_log_submit_bio(&sdp->sd_jdesc->jd_log_bio, REQ_OP_WRITE);11041104- if (gfs2_withdrawing_or_withdrawn(sdp))11041104+ if (gfs2_withdrawn(sdp))11051105 goto out_withdraw;1106110611071107 if (sdp->sd_log_head != sdp->sd_log_flush_head) {···11091109 } else if (sdp->sd_log_tail != sdp->sd_log_flush_tail && !sdp->sd_log_idle) {11101110 log_write_header(sdp, flags);11111111 }11121112- if (gfs2_withdrawing_or_withdrawn(sdp))11121112+ if (gfs2_withdrawn(sdp))11131113 goto out_withdraw;11141114 lops_after_commit(sdp, tr);11151115···11271127 if (!(flags & GFS2_LOG_HEAD_FLUSH_NORMAL)) {11281128 if (!sdp->sd_log_idle) {11291129 empty_ail1_list(sdp);11301130- if (gfs2_withdrawing_or_withdrawn(sdp))11301130+ if (gfs2_withdrawn(sdp))11311131 goto out_withdraw;11321132 log_write_header(sdp, flags);11331133 }···1296129612971297 set_freezable();12981298 while (!kthread_should_stop()) {12991299- if (gfs2_withdrawing_or_withdrawn(sdp))12991299+ if (gfs2_withdrawn(sdp))13001300 break;1301130113021302 /* Check for errors writing to the journal */···13331333 gfs2_ail_flush_reqd(sdp) ||13341334 gfs2_jrnl_flush_reqd(sdp) ||13351335 sdp->sd_log_error ||13361336- gfs2_withdrawing_or_withdrawn(sdp) ||13361336+ gfs2_withdrawn(sdp) ||13371337 kthread_should_stop(),13381338 t);13391339 }
+3-3
fs/gfs2/meta_io.c
···263263 struct buffer_head *bh, *bhs[2];264264 int num = 0;265265266266- if (gfs2_withdrawing_or_withdrawn(sdp) &&266266+ if (gfs2_withdrawn(sdp) &&267267 !gfs2_withdraw_in_prog(sdp)) {268268 *bhp = NULL;269269 return -EIO;···322322323323int gfs2_meta_wait(struct gfs2_sbd *sdp, struct buffer_head *bh)324324{325325- if (gfs2_withdrawing_or_withdrawn(sdp) &&325325+ if (gfs2_withdrawn(sdp) &&326326 !gfs2_withdraw_in_prog(sdp))327327 return -EIO;328328···334334 gfs2_io_error_bh_wd(sdp, bh);335335 return -EIO;336336 }337337- if (gfs2_withdrawing_or_withdrawn(sdp) &&337337+ if (gfs2_withdrawn(sdp) &&338338 !gfs2_withdraw_in_prog(sdp))339339 return -EIO;340340
+1-1
fs/gfs2/ops_fstype.c
···10401040void gfs2_lm_unmount(struct gfs2_sbd *sdp)10411041{10421042 const struct lm_lockops *lm = sdp->sd_lockstruct.ls_ops;10431043- if (!gfs2_withdrawing_or_withdrawn(sdp) && lm->lm_unmount)10431043+ if (!gfs2_withdrawn(sdp) && lm->lm_unmount)10441044 lm->lm_unmount(sdp, true);10451045}10461046
+4-4
fs/gfs2/quota.c
···125125 hlist_bl_del_rcu(&qd->qd_hlist);126126 spin_unlock_bucket(qd->qd_hash);127127128128- if (!gfs2_withdrawing_or_withdrawn(sdp)) {128128+ if (!gfs2_withdrawn(sdp)) {129129 gfs2_assert_warn(sdp, !qd->qd_change);130130 gfs2_assert_warn(sdp, !qd->qd_slot_ref);131131 gfs2_assert_warn(sdp, !qd->qd_bh_count);···15511551{15521552 if (error == 0 || error == -EROFS)15531553 return;15541554- if (!gfs2_withdrawing_or_withdrawn(sdp)) {15541554+ if (!gfs2_withdrawn(sdp)) {15551555 if (!cmpxchg(&sdp->sd_log_error, 0, error))15561556 fs_err(sdp, "gfs2_quotad: %s error %d\n", msg, error);15571557 wake_up(&sdp->sd_logd_waitq);···15831583 while (!kthread_should_stop()) {15841584 unsigned long t;1585158515861586- if (gfs2_withdrawing_or_withdrawn(sdp))15861586+ if (gfs2_withdrawn(sdp))15871587 break;1588158815891589 now = jiffies;···16141614 t = min(statfs_deadline - now, quotad_deadline - now);16151615 wait_event_freezable_timeout(sdp->sd_quota_wait,16161616 sdp->sd_statfs_force_sync ||16171617- gfs2_withdrawing_or_withdrawn(sdp) ||16171617+ gfs2_withdrawn(sdp) ||16181618 kthread_should_stop(),16191619 t);16201620
+1-1
fs/gfs2/recovery.c
···408408 int error = 0;409409 int jlocked = 0;410410411411- if (gfs2_withdrawing_or_withdrawn(sdp)) {411411+ if (gfs2_withdrawn(sdp)) {412412 fs_err(sdp, "jid=%u: Recovery not attempted due to withdraw.\n",413413 jd->jd_jid);414414 goto fail;
+5-5
fs/gfs2/super.c
···137137 int error;138138139139 j_gl->gl_ops->go_inval(j_gl, DIO_METADATA);140140- if (gfs2_withdrawing_or_withdrawn(sdp))140140+ if (gfs2_withdrawn(sdp))141141 return -EIO;142142143143 if (sdp->sd_log_sequence == 0) {···147147 }148148149149 error = gfs2_quota_init(sdp);150150- if (!error && gfs2_withdrawing_or_withdrawn(sdp))150150+ if (!error && gfs2_withdrawn(sdp))151151 error = -EIO;152152 if (!error)153153 set_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags);···491491 if (unlikely(!ip->i_gl))492492 return;493493494494- if (gfs2_withdrawing_or_withdrawn(sdp))494494+ if (gfs2_withdrawn(sdp))495495 return;496496 if (!gfs2_glock_is_locked_by_me(ip->i_gl)) {497497 ret = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh);···597597 if (!sb_rdonly(sb))598598 gfs2_make_fs_ro(sdp);599599 else {600600- if (gfs2_withdrawing_or_withdrawn(sdp))600600+ if (gfs2_withdrawn(sdp))601601 gfs2_destroy_threads(sdp);602602603603 gfs2_quota_cleanup(sdp);···776776 if (test_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags)) {777777 gfs2_log_flush(sdp, NULL, GFS2_LOG_HEAD_FLUSH_FREEZE |778778 GFS2_LFC_FREEZE_GO_SYNC);779779- if (gfs2_withdrawing_or_withdrawn(sdp))779779+ if (gfs2_withdrawn(sdp))780780 return -EIO;781781 }782782 return 0;
+1-1
fs/gfs2/sys.c
···191191192192static ssize_t withdraw_show(struct gfs2_sbd *sdp, char *buf)193193{194194- unsigned int b = gfs2_withdrawing_or_withdrawn(sdp);194194+ unsigned int b = gfs2_withdrawn(sdp);195195 return sysfs_emit(buf, "%u\n", b);196196}197197
+1-1
fs/gfs2/trans.c
···289289 (unsigned long long)bd->bd_bh->b_blocknr);290290 BUG();291291 }292292- if (gfs2_withdrawing_or_withdrawn(sdp)) {292292+ if (gfs2_withdrawn(sdp)) {293293 fs_info(sdp, "GFS2:adding buf while withdrawn! 0x%llx\n",294294 (unsigned long long)bd->bd_bh->b_blocknr);295295 goto out_unlock;
+2-2
fs/gfs2/util.c
···366366void gfs2_assert_withdraw_i(struct gfs2_sbd *sdp, char *assertion,367367 const char *function, char *file, unsigned int line)368368{369369- if (gfs2_withdrawing_or_withdrawn(sdp))369369+ if (gfs2_withdrawn(sdp))370370 return;371371372372 fs_err(sdp,···524524 const char *function, char *file, unsigned int line,525525 bool withdraw)526526{527527- if (gfs2_withdrawing_or_withdrawn(sdp))527527+ if (gfs2_withdrawn(sdp))528528 return;529529530530 fs_err(sdp, "fatal: I/O error - "
+2-3
fs/gfs2/util.h
···183183}184184185185/**186186- * gfs2_withdrawing_or_withdrawn - test whether the file system is withdrawing187187- * or withdrawn186186+ * gfs2_withdrawn - test whether the file system is withdrawn188187 * @sdp: the superblock189188 */190190-static inline bool gfs2_withdrawing_or_withdrawn(struct gfs2_sbd *sdp)189189+static inline bool gfs2_withdrawn(struct gfs2_sbd *sdp)191190{192191 return unlikely(test_bit(SDF_WITHDRAWN, &sdp->sd_flags));193192}