]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
filestore: use std::make_shared to replace new
authorYunchuan Wen <yunchuan.wen@kylin-cloud.com>
Fri, 9 Dec 2016 05:11:52 +0000 (13:11 +0800)
committerYunchuan Wen <yunchuan.wen@kylin-cloud.com>
Fri, 9 Dec 2016 05:46:01 +0000 (13:46 +0800)
Signed-off-by: Yunchuan Wen <yunchuan.wen@kylin-cloud.com>
src/os/filestore/FileStore.cc

index df0c63b89f98745980ba36745fe2c016e7b02c7c..f8e2744121fd5bab96cdbcde154ee6fe84735568 100644 (file)
@@ -324,7 +324,7 @@ int FileStore::lfn_open(const coll_t& cid,
       TEMP_FAILURE_RETRY(::close(fd));
     }
   } else {
-    *outfd = FDRef(new FDCache::FD(fd));
+    *outfd = std::make_shared<FDCache::FD>(fd);
   }
 
   if (need_lock) {