Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-6515

Always true check in mdd_migrate_create

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Lustre 2.12.0
    • Labels:
    • Severity:
      3
    • Rank (Obsolete):
      9223372036854775807

      Description

      smatch highlights this case in mdd_migrate_create():

              handle = mdd_trans_create(env, mdd);
              if (IS_ERR(handle))
                      GOTO(out_free, rc = PTR_ERR(handle));
      
              /* Note: this transaction is part of migration, and it is not
               * the last step of migration, so we set th_local = 1 to avoid
               * update last rcvd for this transaction */
              handle->th_local = 1;
      ....
      stop_trans:
              if (handle != NULL)
                      mdd_trans_stop(env, mdd, rc, handle);
      out_free:
      ...
      

      handle, once allocated, is never freed or reassigned, so I feel like we should just drop that redundant check to avoid some extra confusion?

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                wc-triage WC Triage
                Reporter:
                green Oleg Drokin
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: