From f99a818ad2253fdb3fa74d2bb72f93b68db5c85a Mon Sep 17 00:00:00 2001 From: chrislu Date: Wed, 19 Mar 2025 21:02:26 -0700 Subject: [PATCH] deal with handle not found when flushing fix https://github.com/seaweedfs/seaweedfs/issues/6645#issuecomment-2737400492 --- weed/mount/weedfs_file_sync.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/weed/mount/weedfs_file_sync.go b/weed/mount/weedfs_file_sync.go index 11ce1d3c4..e13ab198d 100644 --- a/weed/mount/weedfs_file_sync.go +++ b/weed/mount/weedfs_file_sync.go @@ -54,7 +54,9 @@ import ( func (wfs *WFS) Flush(cancel <-chan struct{}, in *fuse.FlushIn) fuse.Status { fh := wfs.GetHandle(FileHandleId(in.Fh)) if fh == nil { - return fuse.ENOENT + // If handle is not found, it might have been already released + // This is not an error condition for FLUSH + return fuse.OK } return wfs.doFlush(fh, in.Uid, in.Gid)