]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
BlueStore: fix fd leak during error fsck scan
authorxie xingguo <xie.xingguo@zte.com.cn>
Fri, 15 Jan 2016 09:49:43 +0000 (17:49 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Sun, 17 Jan 2016 14:11:16 +0000 (22:11 +0800)
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/os/bluestore/BlueStore.cc

index 67b5b632d5094a4d62d344f3d9acc76869b2e90b..fb7cfe3be44a47790f003a3d1cca11ae978d3676 100644 (file)
@@ -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();