Skip to content
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

rgw_file: fix non-negative return code for open operation #14045

Merged
merged 1 commit into from Mar 20, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/rgw/rgw_file.h
Expand Up @@ -486,7 +486,7 @@ namespace rgw {
bool stateless_open() const { return flags & FLAG_STATELESS_OPEN; }
bool has_children() const;

uint32_t open(uint32_t gsh_flags) {
int open(uint32_t gsh_flags) {
lock_guard guard(mtx);
if (! (flags & FLAG_OPEN)) {
if (gsh_flags & RGW_OPEN_FLAG_V3) {
Expand All @@ -495,7 +495,7 @@ namespace rgw {
flags |= FLAG_OPEN;
return 0;
}
return EPERM;
return -EPERM;
}

int readdir(rgw_readdir_cb rcb, void *cb_arg, uint64_t *offset, bool *eof,
Expand Down