[CRIU] [PATCH 1/2] mount: simplify devpts_dump
Andrey Vagin
avagin at openvz.org
Wed Jun 25 01:36:42 PDT 2014
Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
mount.c | 16 +---------------
1 file changed, 1 insertion(+), 15 deletions(-)
diff --git a/mount.c b/mount.c
index 917159c..1793c20 100644
--- a/mount.c
+++ b/mount.c
@@ -675,26 +675,12 @@ static int attach_option(struct mount_info *pm, char *opt)
static int devpts_dump(struct mount_info *pm)
{
struct stat *host_st;
- struct stat st;
- int fdir;
host_st = kerndat_get_devpts_stat();
if (host_st == NULL)
return -1;
- fdir = open_mountpoint(pm);
- if (fdir < 0)
- return -1;
-
- if (fstat(fdir, &st)) {
- pr_perror("Unable to statfs %d:%s",
- pm->mnt_id, pm->mountpoint);
- close(fdir);
- return -1;
- }
- close(fdir);
-
- if (host_st->st_dev == st.st_dev)
+ if (host_st->st_dev == kdev_to_odev(pm->s_dev))
return 0;
return attach_option(pm, "newinstance");
--
1.8.5.3
More information about the CRIU
mailing list