rgw: handle racing object puts when object doesn't exist
If the object didn't exist before and now we have multiple puts coming
in concurrently, we need to make sure that we behave correctly. Only one
needs to win, the other one can fail silently. We do that by setting
exclusive flag on the object creation and handling the error correctly.
Note that we still want to return -EEXIST in some cases (when the
exclusive flag is passed to put_obj_meta(), e.g., on bucket creation).
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
(cherry picked from commit
86c15480fc3e33b9a3b84d0af68d8398fc732bae)