client: check sync write error

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
This commit is contained in:
Yan, Zheng 2019-04-08 11:28:32 +08:00
parent c310d09e21
commit 2cf6184e41

View File

@ -9646,9 +9646,11 @@ int64_t Client::_write(Fh *f, int64_t offset, uint64_t size, const char *buf,
in->truncate_size, in->truncate_seq,
&onfinish);
client_lock.unlock();
onfinish.wait();
r = onfinish.wait();
client_lock.lock();
_sync_write_commit(in);
if (r < 0)
goto done;
}
// if we get here, write was successful, update client metadata