mnt: Factor out find-mount-by-s_dev code

And move the 2nd piece lower to avoid fwd declaration and
keep similar calls close to each other.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
check: Implement F_GETOWNER_UIDS

It is in mainline and required for proper CRIU work.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>