New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

osd/PrimaryLogPG: remove duplicated code. #13894

Merged
merged 1 commit into from Mar 13, 2017

Conversation

Projects
None yet
3 participants
@majianpeng
Member

majianpeng commented Mar 9, 2017

In fact, the following code in this function

if (op->may_write()) {
....
// invalid?
if (m->get_snapid() != CEPH_NOSNAP) {
dout(20) << func << ": write to clone not valid " << *m << dendl;
osd->reply_op_error(op, -EINVAL);
return;
}
has the same function. So remove the duplicated code.

Signed-off-by: Jianpeng Ma jianpeng.ma@intel.com

@gregsfortytwo

Reviewed-By: Greg Farnum gfarnum@redhat.com

osd/PrimaryLogPG: remove duplicated code.
In fact, the following code in this function
>> if (op->may_write()) {
>>  ....
>>    // invalid?
>>    if (m->get_snapid() != CEPH_NOSNAP) {
>>      dout(20) << __func__ << ": write to clone not valid " << *m << dendl;
>>      osd->reply_op_error(op, -EINVAL);
>>      return;
>>    }
has the same function. So remove the duplicated code.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>

@yuriw yuriw merged commit 421f671 into ceph:master Mar 13, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details

@majianpeng majianpeng deleted the majianpeng:do_op_duplicated_code branch Mar 14, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment