Skip to content

Commit

Permalink
os/bluestore: release compressor if comp_mode turned out to be none
Browse files Browse the repository at this point in the history
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
  • Loading branch information
xiexingguo committed Jul 8, 2016
1 parent 512edca commit 0cc9781
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/os/bluestore/BlueStore.cc
Expand Up @@ -1465,6 +1465,8 @@ void BlueStore::_set_compression()
}
}
comp_mode = m;
if (comp_mode == COMP_NONE)
compressor = nullptr;
dout(10) << __func__ << " mode " << get_comp_mode_name(comp_mode)
<< " alg " << (compressor ? compressor->get_type() : "(none)")
<< dendl;
Expand Down

0 comments on commit 0cc9781

Please sign in to comment.