'/* fallthrough */' hits implicit-fallthrough error with GCC 11.
This patch replaces the existing '/* fallthrough */' comments and
its variants with the 'fallthrough' pseudo keyword, which was added
by Linux kernel commit v5.4-rc2-141-g294f69e662d1.
Test-Parameters: trivial
Change-Id: Icace4c9953950f86d3c48068d8c6bba7dd1160a6
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/46269
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Peter Jones <pjones@whamcloud.com>
#define register_shrinker(_s) (register_shrinker(_s), 0)
#endif
+#ifndef fallthrough
+#define fallthrough do {} while (0) /* fallthrough */
+#endif
+
static inline void ll_security_release_secctx(char *secdata, u32 seclen)
{
#ifdef HAVE_SEC_RELEASE_SECCTX_1ARG
case LDLM_IBITS:
if (ns->ns_cancel != NULL && ns->ns_cancel(lock) != 0)
break;
- /* fallthrough */
+ fallthrough;
default:
result = LDLM_POLICY_SKIP_LOCK;
break;
default:
CERROR("%s: unknown lfsck_layout status %d\n",
lfsck_lfsck2name(lfsck), lo->ll_status);
- /* fall through */
+ fallthrough;
case LS_SCANNING_PHASE1:
case LS_SCANNING_PHASE2:
/* No need to store the status to disk right now.
lo->ll_status = LS_CRASHED;
if (!lfsck->li_master)
lo->ll_flags |= LF_INCOMPLETE;
- /* fall through */
+ fallthrough;
case LS_PAUSED:
case LS_CRASHED:
case LS_CO_FAILED:
repaired = true;
- /* fall through */
+ /* fallthrough */
}
parent = lfsck_object_find_bottom(env, lfsck, pfid);
default:
CERROR("%s: unknown lfsck_namespace status %d\n",
lfsck_lfsck2name(lfsck), ns->ln_status);
- /* fall through */
+ fallthrough;
case LS_SCANNING_PHASE1:
case LS_SCANNING_PHASE2:
/* No need to store the status to disk right now.
* If the system crashed before the status stored,
* it will be loaded back when next time. */
ns->ln_status = LS_CRASHED;
- /* fall through */
+ fallthrough;
case LS_PAUSED:
case LS_CRASHED:
spin_lock(&lfsck->li_lock);
RETURN(rc);
}
case OBD_IOC_GETNAME_OLD:
- /* fall through */
case OBD_IOC_GETDTNAME:
- /* fall through */
case OBD_IOC_GETMDNAME:
RETURN(ll_get_obd_name(inode, cmd, arg));
case LL_IOC_FLUSHCTX:
op_data->op_attr_blocks += ((struct inode *)data)->i_blocks;
op_data->op_attr.ia_valid |= ATTR_SIZE;
op_data->op_xvalid |= OP_XVALID_BLOCKS;
- /* fallthrough */
+ fallthrough;
case MDS_CLOSE_LAYOUT_SPLIT:
case MDS_CLOSE_LAYOUT_SWAP: {
struct split_param *sp = data;
ladvise_names[advice], rc);
GOTO(out, rc);
}
- /* fallthrough */
+ fallthrough;
case LU_LADVISE_WILLREAD:
case LU_LADVISE_DONTNEED:
default:
RETURN(0);
}
case OBD_IOC_GETNAME_OLD:
- /* fall through */
case OBD_IOC_GETDTNAME:
- /* fall through */
case OBD_IOC_GETMDNAME:
RETURN(ll_get_obd_name(inode, cmd, arg));
case LL_IOC_HSM_STATE_GET: {
case LL_SBI_CHECKSUM:
sbi->ll_checksum_set = 1;
- /* fall through */
+ fallthrough;
case LL_SBI_USER_XATTR:
case LL_SBI_USER_FID2PATH:
case LL_SBI_LRU_RESIZE:
LCONSOLE_ERROR_MSG(0x152,
"invalid %s option\n", s1);
}
- /* fall through */
+ fallthrough;
default:
break;
}
switch (lock->l_req_mode) {
case LCK_PR:
mode = LCK_PR;
- /* fallthrough */
+ fallthrough;
case LCK_PW:
mode |= LCK_CR;
break;
case LCK_CW:
mode = LCK_CW;
- /* fallthrough */
+ fallthrough;
case LCK_CR:
mode |= LCK_CR;
break;
switch (mode & S_IFMT) {
case 0:
mode |= S_IFREG;
- /* fallthrough */
+ fallthrough;
case S_IFREG:
case S_IFCHR:
case S_IFBLK:
v3 = buf->lb_buf;
if (v3->lmm_pool_name[0] != '\0')
pool_name = v3->lmm_pool_name;
- /* fall through */
+ fallthrough;
case LOV_USER_MAGIC_V1:
/* if { size, offset, count } = { 0, -1, 0 } and no pool
* (i.e. all default values specified) then delete default
case __swab32(LOV_USER_MAGIC_V1):
lustre_swab_lov_user_md_v1(v1);
magic = v1->lmm_magic;
- /* fall through */
+ fallthrough;
case LOV_USER_MAGIC_V1:
break;
case __swab32(LOV_USER_MAGIC_V3):
lustre_swab_lov_user_md_v3(v3);
magic = v3->lmm_magic;
- /* fall through */
+ fallthrough;
case LOV_USER_MAGIC_V3:
break;
case __swab32(LOV_USER_MAGIC_SPECIFIC):
lustre_swab_lov_user_md_objects(v3->lmm_objects,
v3->lmm_stripe_count);
magic = v3->lmm_magic;
- /* fall through */
+ fallthrough;
case LOV_USER_MAGIC_SPECIFIC:
break;
case __swab32(LOV_USER_MAGIC_COMP_V1):
__swab32s(&lfm->lfm_type);
__swab32s(&lfm->lfm_flags);
magic = lfm->lfm_magic;
- /* fall through */
+ fallthrough;
case LOV_USER_MAGIC_FOREIGN:
if (!lfm)
lfm = buf->lb_buf;
}
}
}
+ fallthrough;
case LLT_RELEASED:
case LLT_EMPTY:
- /* fall through */
case LLT_FOREIGN:
break;
default:
break;
case HSMA_RESTORE:
hsd->hsd_one_restore = true;
- /* Intentional fallthrough */
+ fallthrough;
default:
cdt_agent_record_hash_add(cdt, hai->hai_cookie,
llh->lgh_hdr->llh_cat_idx,
if (!nodemap_can_setquota(nodemap, oqctl->qc_type,
oqctl->qc_id))
GOTO(out_nodemap, rc = -EPERM);
- /* fallthrough */
+ fallthrough;
case Q_GETINFO:
case Q_GETQUOTA:
case LUSTRE_Q_GETDEFAULT:
if (qmt == NULL)
GOTO(out_nodemap, rc = -EOPNOTSUPP);
/* slave quotactl */
- /* fallthrough */
+ fallthrough;
case Q_GETOINFO:
case Q_GETOQUOTA:
break;
break;
case IT_GETATTR:
check_mdt_object = true;
- /* fallthrough */
+ fallthrough;
case IT_LOOKUP:
it_format = &RQF_LDLM_INTENT_GETATTR;
it_handler = &mdt_intent_getattr;
rc = -EALREADY;
break;
}
- /* fallthrough */
+ fallthrough;
case BS_INIT:
case BS_THAWED:
case BS_EXPIRED:
rc = -EBUSY;
break;
}
- /* fallthrough */
+ fallthrough;
case BS_INIT:
case BS_THAWED:
case BS_EXPIRED:
} /* else case fall through */
} /* else case fall through */
}
- /* fallthrough */
+ fallthrough;
default: {
for (i = 1; i < cnt; i++) {
o_buflen = o_lcfg->lcfg_buflens[i];
CERROR("Cleanup obd device %s error(%d)\n",
obd->obd_name, rc2);
}
- /* fallthrough */
+ fallthrough;
case 3:
echo_site_fini(env, ed);
- /* fallthrough */
+ fallthrough;
case 2:
cl_device_fini(&ed->ed_cl);
- /* fallthrough */
+ fallthrough;
case 1:
OBD_FREE_PTR(ed);
- /* fallthrough */
+ fallthrough;
case 0:
default:
break;
switch (test_mode) {
case 1:
- /* fall through */
+ fallthrough;
case 2:
rc = echo_client_kbrw(ed, rw, oa, eco, data->ioc_offset,
data->ioc_count, async);
GOTO(out, rc = -EPERM);
rw = OBD_BRW_WRITE;
- /* fall through */
+ fallthrough;
case OBD_IOC_BRW_READ:
rc = echo_client_brw_ioctl(env, rw, exp, data);
GOTO(out, rc);
GOTO(out, rc = 60);
if (ext->oe_fsync_wait && !ext->oe_urgent && !ext->oe_hp)
GOTO(out, rc = 65);
- /* fallthrough */
+ fallthrough;
default:
if (atomic_read(&ext->oe_users) > 0)
GOTO(out, rc = 70);
switch (dof->dof_type) {
case DFT_DIR:
dt->do_index_ops = &osd_dir_ops;
- /* fallthrough */
+ fallthrough;
case DFT_INDEX:
/* for zap create */
dmu_tx_hold_zap(oh->ot_tx, DMU_NEW_OBJECT, FALSE, NULL);
break;
}
#endif
- /* fall through */
+ fallthrough;
case KEY_REQKEY_DEFL_THREAD_KEYRING:
ring = key_get(cred->thread_keyring);
if (ring)
break;
- /* fallthrough */
+ fallthrough;
case KEY_REQKEY_DEFL_PROCESS_KEYRING:
ring = key_get(cred->process_keyring);
if (ring)
break;
- /* fallthrough */
+ fallthrough;
case KEY_REQKEY_DEFL_SESSION_KEYRING:
rcu_read_lock();
ring = key_get(rcu_dereference(cred->session_keyring));
rcu_read_unlock();
if (ring)
break;
- /* fallthrough */
+ fallthrough;
case KEY_REQKEY_DEFL_USER_SESSION_KEYRING:
ring = get_user_session_keyring(cred);
break;
switch (rc) {
case -1:
gss_stat_oos_record_svc(1, 1);
- /* fall through */
+ fallthrough;
case 0:
goto exit;
}
/* being handled, so basic msg swabbed, and opc is valid
* but racing with mds_handle(). fallthrough.
*/
+ fallthrough;
case RQ_PHASE_COMPLETE:
/* been handled by mds_handle(), reply state may be volatile */
seq_printf(sf, "opc %d\n", lustre_msg_get_opc(req->rq_reqmsg));
CERROR("invalid msg %p: no ptlrpc body!\n", msg);
}
- /* fallthrough */
+ fallthrough;
default:
/*
* flags might be printed in debug code while message
CERROR("invalid msg %p: no ptlrpc body!\n", msg);
}
- /* fallthrough */
+ fallthrough;
default:
return 0;
}
return pb->pb_status;
CERROR("invalid msg %p: no ptlrpc body!\n", msg);
}
- /* fallthrough */
+ fallthrough;
default:
/*
* status might be printed in debug code while message
switch (lum->lum_magic) {
case LMV_USER_MAGIC_SPECIFIC:
count = lum->lum_stripe_count;
- /* fallthrough */
+ fallthrough;
case __swab32(LMV_USER_MAGIC_SPECIFIC):
lustre_swab_lmv_user_md_objects(lum->lum_objects, count);
break;
case LUSTRE_Q_GETDEFAULT:
case LUSTRE_Q_GETDEFAULT_POOL:
is_default = true;
- /* fallthrough */
+ fallthrough;
case Q_GETQUOTA: /* consult quota limit */
case LUSTRE_Q_GETQUOTAPOOL:
case LUSTRE_Q_SETDEFAULT:
case LUSTRE_Q_SETDEFAULT_POOL:
is_default = true;
- /* fallthrough */
+ fallthrough;
case Q_SETQUOTA: /* change quota limits */
case LUSTRE_Q_SETQUOTAPOOL: