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

os/fs/FS.cc: remove the redundant code. #14362

Merged
merged 1 commit into from Apr 11, 2017

Conversation

Projects
None yet
4 participants
@majianpeng
Member

majianpeng commented Apr 6, 2017

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

os/fs/FS.cc: remove the redundant code.
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
@liewegas

This comment has been minimized.

Member

liewegas commented Apr 7, 2017

Why is this redundant? We still want to return errors from get_events (that aren't EINTR)

@majianpeng

This comment has been minimized.

Member

majianpeng commented Apr 7, 2017

if (r <= 0) {
return r;
}
for (int i=0; i<r; ++i) {
paio[i] = (aio_t *)event[i].obj;
paio[i]->rval = event[i].res;
}
return r;

If r <= 0, it don't exec for and return r immediately. So "if (r <- 0)" don't need.

@liewegas

oh, right, yep!

@yuriw yuriw merged commit aa8b3e7 into ceph:master Apr 11, 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:fs-remove-redundant-code branch Apr 12, 2017

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