mirror of
https://github.com/ceph/ceph
synced 2024-12-29 15:03:33 +00:00
os: Fix version_stamp_is_valid() and write_version_stamp() error return
Caused by 341fb208aa
Signed-off-by: David Zafman <david.zafman@inktank.com>
This commit is contained in:
parent
362dba1086
commit
98b3cd3a78
@ -937,7 +937,7 @@ int FileStore::version_stamp_is_valid(uint32_t *version)
|
||||
int ret = safe_read(fd, bp.c_str(), bp.length());
|
||||
TEMP_FAILURE_RETRY(::close(fd));
|
||||
if (ret < 0)
|
||||
return -errno;
|
||||
return ret;
|
||||
bufferlist bl;
|
||||
bl.push_back(bp);
|
||||
bufferlist::iterator i = bl.begin();
|
||||
@ -960,9 +960,7 @@ int FileStore::write_version_stamp()
|
||||
|
||||
int ret = safe_write(fd, bl.c_str(), bl.length());
|
||||
TEMP_FAILURE_RETRY(::close(fd));
|
||||
if (ret < 0)
|
||||
return -errno;
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
int FileStore::read_op_seq(uint64_t *seq)
|
||||
|
Loading…
Reference in New Issue
Block a user