[CRIU] [PATCH] mount: Correct s_dev conversion in mount_cr_time_mount()

Kirill Tkhai ktkhai at virtuozzo.com
Tue Sep 27 08:06:43 PDT 2016


Convert stat()'s st_dev to kdev bacause mount infos need it.
Like in fetch_rt_stat() function.

https://jira.sw.ru/browse/PSBM-52460

Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 criu/mount.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/criu/mount.c b/criu/mount.c
index eb97cc9..7f8e192 100644
--- a/criu/mount.c
+++ b/criu/mount.c
@@ -1216,7 +1216,7 @@ static int mount_cr_time_mount(struct ns_id *ns, unsigned int *s_dev, const char
 			 pr_perror("Can't stat on %s\n", target);
 			 exit_code = 0;
 		} else {
-			*s_dev = st.st_dev;
+			*s_dev = MKKDEV(major(st.st_dev), minor(st.st_dev));
 			exit_code = 1;
 		}
 	}



More information about the CRIU mailing list