[LU-1399] lustre_cfg_new should return NULL instead of ERR_PTR(-ENOMEM) Created: 11/May/12 Updated: 30/Dec/14 Resolved: 30/Dec/14 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.7.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Isaac Huang (Inactive) | Assignee: | Dmitry Eremin (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Severity: | 3 |
| Rank (Obsolete): | 9750 |
| Description |
|
lustre_cfg_new() currently returns ERR_PTR(-ENOMEM) at allocation failure, but all callers except one checks its return against NULL. As there's no other error to return, I think lustre_cfg_new() should simply return NULL rather than error coded pointers. Also, a minor issue in ptlrpc_check_status(), the console message suppression branch will never be entered and thus is rendered useless. A patch will follow shortly to fix them. |
| Comments |
| Comment by Isaac Huang (Inactive) [ 11/May/12 ] |
|
Patch posted to http://review.whamcloud.com/2724 |
| Comment by Andreas Dilger [ 17/Jun/14 ] |
|
Above patch was abandoned, but there are still some cases where lustre_cfg_new() can return NULL and not be checked. |
| Comment by Gerrit Updater [ 26/Dec/14 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/10739/ |
| Comment by Dmitry Eremin (Inactive) [ 30/Dec/14 ] |
|
Patch landed to master |