Skip to content

Commit

Permalink
Merge pull request #14045 from guihecheng/rgw_file-fix-retcode
Browse files Browse the repository at this point in the history
rgw_file: fix non-negative return code for open operation
  • Loading branch information
mattbenjamin committed Mar 20, 2017
2 parents 4ad1088 + b5f70ef commit ef805fe
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit ef805fe

Please sign in to comment.