From: Rishabh Dave Date: Thu, 23 Oct 2025 11:26:16 +0000 (+0530) Subject: cephfs.pyx: use fdopendir() in rmtree() X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6ba23f5607fbcd25891f533895d20eb67f983f5a;p=ceph.git cephfs.pyx: use fdopendir() in rmtree() Fixes: https://tracker.ceph.com/issues/72992 Signed-off-by: Rishabh Dave --- diff --git a/src/pybind/cephfs/cephfs.pyx b/src/pybind/cephfs/cephfs.pyx index ca005bf11ba4..72c1d8248358 100644 --- a/src/pybind/cephfs/cephfs.pyx +++ b/src/pybind/cephfs/cephfs.pyx @@ -3097,7 +3097,8 @@ class RmtreeDir: # XXX: exception (if) raised here should be handled by caller based on # the context. - self.handle = self.fs.opendir(self.path) + self.fd = self.fs.open(self.rel_path, os.O_RDONLY | os.O_DIRECTORY, 0o755) + self.handle = self.fs.fdopendir(self.fd) # Is this directory empty? It will be set by self.read_dir(). self.is_empty = None