Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
criu
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhul
criu
Commits
c5054f95
Commit
c5054f95
authored
Sep 22, 2015
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mnt: Factor out external check in validate_mounts
Signed-off-by:
Pavel Emelyanov
<
xemul@parallels.com
>
parent
4e027634
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
21 deletions
+15
-21
mount.c
mount.c
+15
-21
No files found.
mount.c
View file @
c5054f95
...
...
@@ -675,34 +675,28 @@ static int validate_mounts(struct mount_info *info, bool for_dump)
m
->
mountpoint
,
m
->
s_dev
,
m
->
root
,
m
->
mnt_id
);
return
-
1
;
}
}
else
{
}
else
if
(
!
m
->
external
)
{
t
=
find_fsroot_mount_for
(
m
);
if
(
!
t
)
{
int
ret
;
/*
* No root-mount found for this bind and it's neither
* marked nor auto-resolved as external one. So last
* chance not to fail is to talk to plugins.
*/
if
(
for_dump
)
{
ret
=
run_plugins
(
DUMP_EXT_MOUNT
,
m
->
mountpoint
,
m
->
mnt_id
);
if
(
ret
==
0
)
m
->
need_plugin
=
true
;
}
else
/*
* We've already resolved the mount
* and it is external.
* Plugin should take care of this one
* in restore_ext_mount, or do_bind_mount
* will mount it as external
*/
if
(
m
->
external
)
{
ret
=
0
;
}
else
{
ret
=
run_plugins
(
DUMP_EXT_MOUNT
,
m
->
mountpoint
,
m
->
mnt_id
);
if
(
ret
==
0
)
m
->
need_plugin
=
true
;
}
}
else
{
if
(
m
->
need_plugin
||
m
->
external
)
/*
* plugin should take care of this one
* in restore_ext_mount, or do_bind_mount
* will mount it as external
*/
ret
=
0
;
else
ret
=
-
ENOTSUP
;
}
ret
=
m
->
need_plugin
?
0
:
-
ENOTSUP
;
if
(
ret
<
0
)
{
if
(
ret
==
-
ENOTSUP
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment