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
0efaf212
Commit
0efaf212
authored
Dec 11, 2013
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mount: Clean code a bit
Signed-off-by:
Pavel Emelyanov
<
xemul@parallels.com
>
parent
c5d2386a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
files-reg.c
files-reg.c
+3
-2
mount.c
mount.c
+4
-1
No files found.
files-reg.c
View file @
0efaf212
...
...
@@ -285,8 +285,8 @@ static int dump_ghost_remap(char *path, const struct stat *st, int lfd, u32 id)
{
struct
ghost_file
*
gf
;
RemapFilePathEntry
rpe
=
REMAP_FILE_PATH_ENTRY__INIT
;
dev_t
phys_dev
=
phys_stat_resolve_dev
(
st
->
st_dev
,
path
)
;
dev_t
phys_dev
;
pr_info
(
"Dumping ghost file for fd %d id %#x
\n
"
,
lfd
,
id
);
if
(
st
->
st_size
>
MAX_GHOST_FILE_SIZE
)
{
...
...
@@ -295,6 +295,7 @@ static int dump_ghost_remap(char *path, const struct stat *st, int lfd, u32 id)
return
-
1
;
}
phys_dev
=
phys_stat_resolve_dev
(
st
->
st_dev
,
path
);
list_for_each_entry
(
gf
,
&
ghost_files
,
list
)
if
((
gf
->
dev
==
phys_dev
)
&&
(
gf
->
ino
==
st
->
st_ino
))
goto
dump_entry
;
...
...
mount.c
View file @
0efaf212
...
...
@@ -149,7 +149,9 @@ static struct mount_info *mount_resolve_path(const char *path)
dev_t
phys_stat_resolve_dev
(
dev_t
st_dev
,
const
char
*
path
)
{
struct
mount_info
*
m
=
mount_resolve_path
(
path
);
struct
mount_info
*
m
;
m
=
mount_resolve_path
(
path
);
/*
* BTRFS returns subvolume dev-id instead of
* superblock dev-id, in such case return device
...
...
@@ -162,6 +164,7 @@ bool phys_stat_dev_match(dev_t st_dev, dev_t phys_dev, const char *path)
{
if
(
st_dev
==
phys_dev
)
return
true
;
return
phys_dev
==
phys_stat_resolve_dev
(
st_dev
,
path
);
}
...
...
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