FIX #2122: file locking bug
[ghc-hetmet.git] / rts / posix / FileLock.c
index 436d8c9..8d25820 100644 (file)
@@ -88,6 +88,7 @@ lockFile(int fd, dev_t dev, ino_t ino, int for_writing)
         if (for_writing || lock->readers < 0) {
             return -1;
         }
+        insertHashTable(fd_hash, fd, lock);
         lock->readers++;
         return 0;
     }