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

suspicious code in ldlm_prepare_lru_list()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.12.0
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      There is some suspicious code in ldlm_prepare_lru_list() which should be fixed:

      static int ldlm_prepare_lru_list(struct ldlm_namespace *ns,
                                       struct list_head *cancels, int count, int max,
                                       enum ldlm_lru_flags lru_flags)
      ...
                              if (!ldlm_is_canceling(lock) || /* XXX '||' should be '&&' */
                                  !ldlm_is_converting(lock))
                                      break;
      ...
                      if (result == LDLM_POLICY_SKIP_LOCK) {
                              lu_ref_del(&lock->l_reference, __func__, current);
                              LDLM_LOCK_RELEASE(lock); /* XXX release should follow if block. */
                              if (no_wait) {
                                      spin_lock(&ns->ns_lock);
                                      if (!list_empty(&lock->l_lru) &&
                                          lock->l_lru.prev == ns->ns_last_pos)
                                              ns->ns_last_pos = &lock->l_lru;
                                      spin_unlock(&ns->ns_lock);
                              }
                              continue;
                      }
      

      Attachments

        Issue Links

          Activity

            People

              jhammond John Hammond
              jhammond John Hammond
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: