From 492ea1a04ee1c6c3212c3f3c9ad7ceda538dd095 Mon Sep 17 00:00:00 2001 From: Ayush Ranjan Date: Fri, 18 Feb 2022 20:00:41 -0800 Subject: [PATCH] Do not batch close gofer.handle in lisafs. In some scenarios, these handles are backed by open FDs to FIFO files. We can not delay closing of such handles because application behavior depends on the FD being closed immediately. For example, for pipes, when the write end is closed, then read(2) on the read end will return 0 indicating that there are no writers. PiperOrigin-RevId: 429698807 --- pkg/sentry/fsimpl/gofer/handle.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/sentry/fsimpl/gofer/handle.go b/pkg/sentry/fsimpl/gofer/handle.go index 394aecd62..96c7b736d 100644 --- a/pkg/sentry/fsimpl/gofer/handle.go +++ b/pkg/sentry/fsimpl/gofer/handle.go @@ -105,7 +105,7 @@ func (h *handle) isOpen() bool { func (h *handle) close(ctx context.Context) { if h.fdLisa.Client() != nil { - h.fdLisa.CloseBatched(ctx) + h.fdLisa.Close(ctx) } else { h.file.close(ctx) h.file = p9file{}