[LU-7120] [style][uselessAssignmentPtrArg] Assignment of function parameter has no effect outside the function. Created: 09/Sep/15 Updated: 16/Nov/15 Resolved: 16/Nov/15 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.8.0 |
| Fix Version/s: | Lustre 2.8.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Ashish Purkar | Assignee: | nasf (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
any |
||
| Severity: | 3 |
| Rank (Obsolete): | 9223372036854775807 |
| Description |
|
File:lustre-wc-rel/lustre/osd-ldiskfs/osd_scrub.c static void osd_scrub_post(struct osd_scrub *scrub, int result)
{
struct scrub_file *sf = &scrub->os_file;
ENTRY;
CDEBUG(D_LFSCK, "%.16s: OI scrub post, result = %d\n",
osd_scrub2name(scrub), result);
.
.
.
sf->sf_run_time += cfs_duration_sec(cfs_time_current() + HALF_SEC -
scrub->os_time_last_checkpoint);
result = osd_scrub_file_store(scrub); <--- Assignment of function parameter has no effect outside the function.
up_write(&scrub->os_rwsem);
EXIT;
}
Called from: static int osd_scrub_main(void *args)
{
struct lu_env env;
struct osd_device *dev = (struct osd_device *)args;
struct osd_scrub *scrub = &dev->od_scrub;
struct ptlrpc_thread *thread = &scrub->os_thread;
int rc;
ENTRY;
.
.
.
post:
osd_scrub_post(scrub, rc); <--- Called from here
CDEBUG(D_LFSCK, "%.16s: OI scrub: stop, pos = %u: rc = %d\n",
osd_scrub2name(scrub), scrub->os_pos_current, rc);
out:
while (!list_empty(&scrub->os_inconsistent_items)) {
struct osd_inconsistent_item *oii;
oii = list_entry(scrub->os_inconsistent_items.next,
struct osd_inconsistent_item, oii_list);
list_del_init(&oii->oii_list);
OBD_FREE_PTR(oii);
}
lu_env_fini(&env);
noenv:
spin_lock(&scrub->os_lock);
thread_set_flags(thread, SVC_STOPPED);
wake_up_all(&thread->t_ctl_waitq);
spin_unlock(&scrub->os_lock);
return rc;
}
|
| Comments |
| Comment by Peter Jones [ 10/Sep/15 ] |
|
Fan Yong Could you please look into this? Thanks Peter |
| Comment by Gerrit Updater [ 11/Sep/15 ] |
|
Fan Yong (fan.yong@intel.com) uploaded a new patch: http://review.whamcloud.com/16368 |
| Comment by Gerrit Updater [ 13/Nov/15 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/16368/ |