[LU-6514] redundant rc check in lprocfs_client_fid_width_seq_write Created: 27/Apr/15 Updated: 07/Jul/15 Resolved: 07/Jul/15 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.8.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Oleg Drokin | Assignee: | WC Triage |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Severity: | 3 |
| Rank (Obsolete): | 9223372036854775807 |
| Description |
|
There is a bit of strange code in lprocfs_client_fid_width_seq_write(): rc = lprocfs_write_helper(buffer, count, &val);
if (rc) {
mutex_unlock(&seq->lcs_mutex);
RETURN(rc);
}
if (seq->lcs_type == LUSTRE_SEQ_DATA)
max = LUSTRE_DATA_SEQ_MAX_WIDTH;
else
max = LUSTRE_METADATA_SEQ_MAX_WIDTH;
if (val <= max && val > 0) {
seq->lcs_width = val;
if (rc == 0) {
CDEBUG(D_INFO, "%s: Sequence size: "LPU64"\n",
seq->lcs_name, seq->lcs_width);
}
}
note that the last rc ==0 is always true, but it's also somewhat misleadign in that the thinking goes that we can be there with rc !=0, but would still set the setting, just not print the message which is total nonsense. |
| Comments |
| Comment by Gerrit Updater [ 27/Apr/15 ] |
|
Oleg Drokin (oleg.drokin@intel.com) uploaded a new patch: http://review.whamcloud.com/14604 |
| Comment by Gerrit Updater [ 24/Jun/15 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/14604/ |