[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: |
|
||||||||
| 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 " |