From 47d17c9443f10bb5b8e120c8b13f87b65d69d86b Mon Sep 17 00:00:00 2001 From: guangwu Date: Wed, 22 May 2024 15:11:53 +0800 Subject: [PATCH] cephfs: close dir Signed-off-by: guoguangwu (cherry picked from commit 9574fa881bc6e2840ebb135d49fef0c1c5c84b9a) --- internal/cephfs/nodeserver.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/cephfs/nodeserver.go b/internal/cephfs/nodeserver.go index 2af514c36..ea52c3f08 100644 --- a/internal/cephfs/nodeserver.go +++ b/internal/cephfs/nodeserver.go @@ -393,6 +393,7 @@ func getBackingSnapshotRoot( return "", status.Errorf(codes.Internal, err.Error()) } + defer dir.Close() // Read the contents of /.snap directory into a string slice.