[CRIU] [PATCH 2/8] regfiles: Do not serialize remap lookup

Pavel Emelyanov xemul at virtuozzo.com
Thu May 18 02:35:34 PDT 2017


We used to have users counter on remap which was
incremented each time this routine was called. Nowadays
remaps are managed w/o the refcounting and we no
longer need global mutex protection for it.

Signed-off-by: Pavel Emelyanov <xemul at virtuozzo.com>
---
 criu/files-reg.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/criu/files-reg.c b/criu/files-reg.c
index 7dbf2b8..5456614 100644
--- a/criu/files-reg.c
+++ b/criu/files-reg.c
@@ -625,14 +625,11 @@ struct file_remap *lookup_ghost_remap(u32 dev, u32 ino)
 {
 	struct ghost_file *gf;
 
-	mutex_lock(ghost_file_mutex);
 	list_for_each_entry(gf, &ghost_files, list) {
 		if (gf->ino == ino && (gf->dev == dev)) {
-			mutex_unlock(ghost_file_mutex);
 			return &gf->remap;
 		}
 	}
-	mutex_unlock(ghost_file_mutex);
 
 	return NULL;
 }
-- 
2.1.4



More information about the CRIU mailing list