Browse Source

[LibOS] Always call FS-specific checkpoint callback

Previously, FS-specific checkpoint callback was called only the
first time process forks. This commit fixes this bug by always calling
FS-specific checkpoint (it is now the responsibility of the specific
checkpoint callback to skip re-creating the checkpoint as perf
optimization).
smherwig 6 years ago
parent
commit
15ca4a9374
1 changed files with 2 additions and 3 deletions
  1. 2 3
      LibOS/shim/src/fs/shim_fs.c

+ 2 - 3
LibOS/shim/src/fs/shim_fs.c

@@ -561,9 +561,8 @@ BEGIN_CP_FUNC(mount)
         off = ADD_CP_OFFSET(sizeof(struct shim_mount));
         ADD_TO_CP_MAP(obj, off);
 
-        if (!mount->cpdata &&
-            mount->fs_ops &&
-            mount->fs_ops->checkpoint) {
+        mount->cpdata = NULL;
+        if (mount->fs_ops && mount->fs_ops->checkpoint) {
             void * cpdata = NULL;
             int bytes = mount->fs_ops->checkpoint(&cpdata, mount->data);
             if (bytes > 0) {