From: xie xingguo Date: Fri, 15 Jan 2016 09:49:43 +0000 (+0800) Subject: BlueStore: fix fd leak during error fsck scan X-Git-Tag: v10.0.4~195^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=dea2d92da01afa4e79508dcf91574d1a933320df;p=ceph.git BlueStore: fix fd leak during error fsck scan Signed-off-by: xie xingguo --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 67b5b632d50..fb7cfe3be44 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -2194,7 +2194,8 @@ int BlueStore::fsck() } catch (buffer::error& e) { derr << __func__ << " failed to decode wal txn " << pretty_binary_string(it->key()) << dendl; - return -EIO; + r = -EIO; + goto out_scan; } dout(20) << __func__ << " wal " << wt.seq << " ops " << wt.ops.size() @@ -2229,6 +2230,7 @@ int BlueStore::fsck() } } + out_scan: coll_map.clear(); out_alloc: _close_alloc();