Commit 44356b37 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

mount: simplify devpts_dump

Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Acked-by: 's avatarSerge E. Hallyn <serge.hallyn@ubuntu.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 817bf785
...@@ -675,26 +675,12 @@ static int attach_option(struct mount_info *pm, char *opt) ...@@ -675,26 +675,12 @@ static int attach_option(struct mount_info *pm, char *opt)
static int devpts_dump(struct mount_info *pm) static int devpts_dump(struct mount_info *pm)
{ {
struct stat *host_st; struct stat *host_st;
struct stat st;
int fdir;
host_st = kerndat_get_devpts_stat(); host_st = kerndat_get_devpts_stat();
if (host_st == NULL) if (host_st == NULL)
return -1; return -1;
fdir = open_mountpoint(pm); if (host_st->st_dev == kdev_to_odev(pm->s_dev))
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)
return 0; return 0;
return attach_option(pm, "newinstance"); return attach_option(pm, "newinstance");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment