diff options
author | Samuel Just <samuel.just@dreamhost.com> | 2011-09-06 11:49:38 -0700 |
---|---|---|
committer | Samuel Just <samuel.just@dreamhost.com> | 2011-09-06 11:49:38 -0700 |
commit | 703631e5cc672ddea01b6dfb0b147e1c48850191 (patch) | |
tree | 320d3b5fe28a90bafe2843a92b25d2f59b8c9525 | |
parent | 3fa2103ba9767555e0ba5b572055fcc2eb6e6e8d (diff) | |
download | ceph-703631e5cc672ddea01b6dfb0b147e1c48850191.tar.gz |
FileStore: close correct fd in version_stamp methods
version_stamp_is_valid and write_version_stamp previously closed op_fd
rather than fd causing write_op_sep to fail in sync_entry.
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
-rw-r--r-- | src/os/FileStore.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index a34e5f787b6..86281ab9982 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -1268,7 +1268,7 @@ int FileStore::version_stamp_is_valid(uint32_t *version) } bufferptr bp(PATH_MAX); int ret = safe_read(fd, bp.c_str(), bp.length()); - TEMP_FAILURE_RETRY(::close(op_fd)); + TEMP_FAILURE_RETRY(::close(fd)); if (ret < 0) return -errno; bufferlist bl; @@ -1292,7 +1292,7 @@ int FileStore::write_version_stamp() ::encode(on_disk_version, bl); int ret = safe_write(fd, bl.c_str(), bl.length()); - TEMP_FAILURE_RETRY(::close(op_fd)); + TEMP_FAILURE_RETRY(::close(fd)); if (ret < 0) return -errno; return 0; |