[LU-6515] Always true check in mdd_migrate_create Created: 27/Apr/15  Updated: 16/Jun/20  Resolved: 16/Jun/20

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

Type: Bug Priority: Minor
Reporter: Oleg Drokin Assignee: WC Triage
Resolution: Fixed Votes: 0
Labels: easy

Issue Links:
Related
is related to LU-4684 DNE3: allow migrating DNE striped dir... Resolved
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?



 Comments   
Comment by Andreas Dilger [ 16/Jun/20 ]

This was fixed in patch https://review.whamcloud.com/31427 "LU-4684 migrate: migrate striped directory"

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