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

Suspect locking cleanup issue in mdt_create()

Details

    • Bug
    • Resolution: Not a Bug
    • Minor
    • Lustre 2.11.0
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      In mdt_create():

                              if (!mdt_object_remote(parent)) {
                                      mdt_object_unlock(info, parent, lh, 1);
                                      mdt_lock_pdo_init(lh, LCK_PW, &rr->rr_name);
                                      rc = mdt_reint_object_lock(info, parent, lh,
                                                                 MDS_INODELOCK_UPDATE,
                                                                 true);
                                      if (rc)
                                              GOTO(put_child, rc);
                              }
      ...
      put_child:
              mdt_object_put(info->mti_env, child);
      unlock_parent:
              mdt_object_unlock(info, parent, lh, rc);
      put_parent:
              mdt_object_put(info->mti_env, parent);
              RETURN(rc);
      

      So if we cannot lock parent we jump to put child and then unlock parent? that sounds wrong.

      Attachments

        Activity

          People

            laisiyao Lai Siyao
            green Oleg Drokin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: