[LU-6513] redundant rc check in mgs_setparam Created: 27/Apr/15  Updated: 30/Jan/22  Resolved: 30/Jan/22

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Oleg Drokin Assignee: WC Triage
Resolution: Not a Bug Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 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 ?


Generated at Sat Feb 10 02:00:52 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.