From 213234bfea8af0e873d3d710b32b3918ba97466d Mon Sep 17 00:00:00 2001
From: Kirill Smelkov <kirr@nexedi.com>
Date: Mon, 2 Mar 2020 16:26:33 +0300
Subject: [PATCH] .

---
 wcfs/client/wcfs.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/wcfs/client/wcfs.cpp b/wcfs/client/wcfs.cpp
index c758c805..aaee2ca1 100644
--- a/wcfs/client/wcfs.cpp
+++ b/wcfs/client/wcfs.cpp
@@ -807,7 +807,8 @@ pair<Mapping, error> _FileH::mmap(int64_t blk_start, int64_t blk_len, VMA *vma)
 
     xerr::Contextf E("%s: mmap f<%s> [blk%ld +blk%ld)", v(f.wconn), v(f.foid), blk_start, blk_len);
 
-    // XXX closed -> return E(os::ErrClosed)
+    if (f._closed)  // XXX locking
+        return make_pair(nil, E(os::ErrClosed));
 
     error err;
 
-- 
2.30.9