Skip to content

Commit

Permalink
fs: Fix use of uninitialized value in ZonedBlockDevice destructor
Browse files Browse the repository at this point in the history
Reported-by: Yura Sorokin <[email protected]>
Signed-off-by: Andreas Hindborg <[email protected]>
  • Loading branch information
metaspace authored and yhr committed Jan 5, 2022
1 parent 52b9c51 commit d7e468d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion fs/zbd_zenfs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,12 @@ Zone *ZonedBlockDevice::GetIOZone(uint64_t offset) {
ZonedBlockDevice::ZonedBlockDevice(std::string bdevname,
std::shared_ptr<Logger> logger,
std::shared_ptr<ZenFSMetrics> metrics)
: filename_("/dev/" + bdevname), logger_(logger), metrics_(metrics) {
: filename_("/dev/" + bdevname),
read_f_(-1),
read_direct_f_(-1),
write_f_(-1),
logger_(logger),
metrics_(metrics) {
Info(logger_, "New Zoned Block Device: %s", filename_.c_str());
}

Expand Down

0 comments on commit d7e468d

Please sign in to comment.