Details
-
Bug
-
Resolution: Unresolved
-
Minor
-
Lustre 2.17.0
-
3
-
9223372036854775807
Description
smatch highlights that hdl is potentially unused in osd_create_last_id():
static int osd_create_lastid(const struct lu_env *env, struct osd_device *dev, struct osd_zap_it *ozi, __u64 lastid_known) { ... sa_handle_t *hdl; ... ENTRY; tx = dmu_tx_create(dev->od_os); if (!tx) GOTO(out, rc = -ENOMEM); dmu_tx_hold_sa_create(tx, osd_find_dnsize(dev, OSD_BASE_EA_IN_BONUS)); dmu_tx_hold_zap(tx, dir, FALSE, NULL); rc = -dmu_tx_assign(tx, DMU_TX_WAIT); if (rc) GOTO(abort, rc); ... a lot more of these error exits ... abort: if (dn) dmu_object_free(dev->od_os, dn->dn_object, tx); dmu_tx_abort(tx); out: if (hdl) <<<===== uninitialized variable use. sa_handle_destroy(hdl);
Introduced by https://review.whamcloud.com/c/fs/lustre-release/+/53898
Surprised gcc did not flag it.
Attachments
Issue Links
- is related to
-
LU-17393 OI Scrub does not repair LAST_ID on MDT
-
- Resolved
-