diff options
author | Yehuda Sadeh <yehuda@inktank.com> | 2013-09-03 13:27:21 -0700 |
---|---|---|
committer | Yehuda Sadeh <yehuda@inktank.com> | 2013-09-03 13:27:21 -0700 |
commit | 768c47d24f1a2fb2a39f4a2cdc535b42a53a61f5 (patch) | |
tree | 48f00f043c5850fe6c5e8aee2aa503dd7fe1992f | |
parent | e48d6cb4023fb3735e9c4288f5d5c7bac44eadde (diff) | |
download | ceph-wip-6214.tar.gz |
rgw: when failing read from client, return correct errorwip-6214
Fixes: #6214
Backport: bobtail, cuttlefish, dumpling
When getting a failed read from client when putting an object
we returned the wrong value (always 0), which in the chunked-
upload case ended up in assuming that the write was done
successfully.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
-rw-r--r-- | src/rgw/rgw_rest.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rgw/rgw_rest.cc b/src/rgw/rgw_rest.cc index 571e4869642..c4d6a287cc5 100644 --- a/src/rgw/rgw_rest.cc +++ b/src/rgw/rgw_rest.cc @@ -691,7 +691,7 @@ int RGWPutObj_ObjStore::get_data(bufferlist& bl) int r = s->cio->read(bp.c_str(), cl, &read_len); len = read_len; if (r < 0) - return ret; + return r; bl.append(bp, 0, len); } |