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
00770a91
Commit
00770a91
authored
Nov 10, 2014
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kerndat: Handle errors from devtmpfs virtualized checks
Signed-off-by:
Pavel Emelyanov
<
xemul@parallels.com
>
parent
69bffe26
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
8 deletions
+26
-8
mount.c
mount.c
+26
-8
No files found.
mount.c
View file @
00770a91
...
...
@@ -745,16 +745,30 @@ out:
return
ret
;
}
static
bool
rt_detmpfs_match
(
struct
mount_info
*
pm
)
/*
* Virtualized devtmpfs on any side (dump or restore)
* means, that we should try to handle it as a plain
* tmpfs.
*
* Interesting case -- shared on dump and virtual on
* restore -- will fail, since no tarball with the fs
* contents will be found.
*/
static
int
devtmpfs_virtual
(
struct
mount_info
*
pm
)
{
return
kerndat_fs_virtualized
(
KERNDAT_FS_STAT_DEVTMPFS
,
pm
->
s_dev
)
==
0
;
return
kerndat_fs_virtualized
(
KERNDAT_FS_STAT_DEVTMPFS
,
pm
->
s_dev
);
}
static
int
devtmpfs_dump
(
struct
mount_info
*
pm
)
{
if
(
!
rt_detmpfs_match
(
pm
))
return
tmpfs_dump
(
pm
);
return
0
;
int
ret
;
ret
=
devtmpfs_virtual
(
pm
);
if
(
ret
==
1
)
ret
=
tmpfs_dump
(
pm
);
return
ret
;
}
static
int
tmpfs_restore
(
struct
mount_info
*
pm
)
...
...
@@ -783,9 +797,13 @@ static int tmpfs_restore(struct mount_info *pm)
static
int
devtmpfs_restore
(
struct
mount_info
*
pm
)
{
if
(
!
rt_detmpfs_match
(
pm
))
return
tmpfs_restore
(
pm
);
return
0
;
int
ret
;
ret
=
devtmpfs_virtual
(
pm
);
if
(
ret
==
1
)
ret
=
tmpfs_restore
(
pm
);
return
ret
;
}
static
int
binfmt_misc_dump
(
struct
mount_info
*
pm
)
...
...
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