]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/FileStore: fix pipe file descriptor leak 5310/head
authorYan, Zheng <zyan@redhat.com>
Wed, 22 Jul 2015 02:35:36 +0000 (10:35 +0800)
committerYan, Zheng <zyan@redhat.com>
Wed, 22 Jul 2015 07:05:36 +0000 (15:05 +0800)
Signed-off-by: Yan, Zheng <zyan@redhat.com>
src/os/FileStore.cc
src/os/GenericFileStoreBackend.cc

index a9f4470e140f143068e373ed223f7a5716fd7b24..02978781f0b6b13d57b748da9773f11dacfd1894 100644 (file)
@@ -3482,6 +3482,8 @@ int FileStore::_do_copy_range(int from, int to, uint64_t srcoff, uint64_t len, u
        break;
       }
     }
+    close(pipefd[0]);
+    close(pipefd[1]);
   } else
 #endif
   {
index bfefd42da35a051a0c816c623c69251a4344c70a..508f533ab2f6e4698a827c9b83480e258c14b167 100644 (file)
@@ -178,6 +178,8 @@ int GenericFileStoreBackend::detect_features()
        dout(0) << "detect_features: splice is supported" << dendl;
       } else
        dout(0) << "detect_features: splice is NOT supported" << dendl;
+      close(pipefd[0]);
+      close(pipefd[1]);
     }
   }
 #endif