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

redundant rc check in mgs_setparam

    XMLWordPrintable

Details

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

    Description

      smatch highlighted this bit in mgs_setparam:

              rc = mgs_parse_devname(devname, fsname, NULL);
              if (rc == 0 && !mgs_parse_devname(devname, NULL, &index)) {
                      /* param related to llite isn't allowed to set by OST or MDT */
                      if (rc == 0 && strncmp(param, PARAM_LLITE,
                                             sizeof(PARAM_LLITE) - 1) == 0)
                              RETURN(-EINVAL);
              } else {
      

      So, why do we need this second rc == 0 check? let's take it down to improce clarity, perhaps we can even combine the two if statements ?

      Attachments

        Activity

          People

            wc-triage WC Triage
            green Oleg Drokin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: