servicefd: add a service fd for current root

It's already used for dumping files and it will be used for restoring,
so it should be service fd to avoid intersection with restored
descriptors.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
mount: open_mountpoint returns a file descriptro

Only one function use DIR, so I don't see reason to return it

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
mount: fix comparison of stat.st_dev and mount_info->s_dev (v2)

st_dev and s_dev have different formats.
st_dev is (MAJOR(dev) << 8) | MINOR(dev)
s_dev is (MAJOR(dev) << 20) | MINOR(dev)

so we need to convert one of them

v2: use kdev_to_odev
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
mount: open_mount uses __open_mountpoint instead of own logic

Now we have two funсtions which do mostly the same, so this patch merges
them.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>