[LU-8671] bad error handling in mgs_object_init Created: 06/Oct/16 Updated: 08/Nov/18 Resolved: 08/Nov/18 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Ashish Purkar (Inactive) | Assignee: | WC Triage |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | patch | ||
| Issue Links: |
|
||||||||
| Severity: | 3 | ||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||
| Description |
|
The function mgs_object_init() lost an error code return and always return zero as success. lustre-wc-rel/lustre/mgs/mgs_handler.c: /* do no set .do_ops as mgs calls to bottom osd directly */ CDEBUG(D_INFO, "object init, fid = "DFID"\n", under = &d->mgs_bottom->dd_lu_dev; return 0; |
| Comments |
| Comment by Gerrit Updater [ 06/Oct/16 ] |
|
Ashish Purkar (ashish.purkar@seagate.com) uploaded a new patch: http://review.whamcloud.com/22973 |
| Comment by Ashish Purkar (Inactive) [ 06/Oct/16 ] |
|
lustre-wc-rel/lustre/mgs/mgs_handler.c: static int mgs_object_init(const struct lu_env *env, struct lu_object *o, const struct lu_object_conf *unused) { struct mgs_device *d = lu2mgs_dev(o->lo_dev); struct lu_device *under; struct lu_object *below; int rc = 0; ENTRY; /* do no set .do_ops as mgs calls to bottom osd directly */ CDEBUG(D_INFO, "object init, fid = "DFID"\n", PFID(lu_object_fid(o))); under = &d->mgs_bottom->dd_lu_dev; below = under->ld_ops->ldo_object_alloc(env, o->lo_header, under); if (below != NULL) lu_object_add(o, below); else rc = -ENOMEM;<--- Variable 'rc' is assigned a value that is never used. return 0; } |
| Comment by Andreas Dilger [ 08/Nov/18 ] |
|
This is fixed in patch http://review.whamcloud.com/23221 " |