Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
linux-seco-imx
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Jira
Code
Merge requests
12
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Clea OS
bsp
nxp
linux-seco-imx
Commits
db6ec212
Commit
db6ec212
authored
10 years ago
by
Al Viro
Browse files
Options
Downloads
Patches
Plain Diff
overlayfs: embed middle into overlay_readdir_data
same story... Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
49be4fb9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fs/overlayfs/readdir.c
+5
-7
5 additions, 7 deletions
fs/overlayfs/readdir.c
with
5 additions
and
7 deletions
fs/overlayfs/readdir.c
+
5
−
7
View file @
db6ec212
...
@@ -38,7 +38,7 @@ struct ovl_readdir_data {
...
@@ -38,7 +38,7 @@ struct ovl_readdir_data {
bool
is_merge
;
bool
is_merge
;
struct
rb_root
root
;
struct
rb_root
root
;
struct
list_head
*
list
;
struct
list_head
*
list
;
struct
list_head
*
middle
;
struct
list_head
middle
;
int
count
;
int
count
;
int
err
;
int
err
;
};
};
...
@@ -139,13 +139,13 @@ static int ovl_fill_lower(struct ovl_readdir_data *rdd,
...
@@ -139,13 +139,13 @@ static int ovl_fill_lower(struct ovl_readdir_data *rdd,
p
=
ovl_cache_entry_find
(
&
rdd
->
root
,
name
,
namelen
);
p
=
ovl_cache_entry_find
(
&
rdd
->
root
,
name
,
namelen
);
if
(
p
)
{
if
(
p
)
{
list_move_tail
(
&
p
->
l_node
,
rdd
->
middle
);
list_move_tail
(
&
p
->
l_node
,
&
rdd
->
middle
);
}
else
{
}
else
{
p
=
ovl_cache_entry_new
(
name
,
namelen
,
ino
,
d_type
);
p
=
ovl_cache_entry_new
(
name
,
namelen
,
ino
,
d_type
);
if
(
p
==
NULL
)
if
(
p
==
NULL
)
rdd
->
err
=
-
ENOMEM
;
rdd
->
err
=
-
ENOMEM
;
else
else
list_add_tail
(
&
p
->
l_node
,
rdd
->
middle
);
list_add_tail
(
&
p
->
l_node
,
&
rdd
->
middle
);
}
}
return
rdd
->
err
;
return
rdd
->
err
;
...
@@ -277,7 +277,6 @@ static inline int ovl_dir_read_merged(struct path *upperpath,
...
@@ -277,7 +277,6 @@ static inline int ovl_dir_read_merged(struct path *upperpath,
struct
list_head
*
list
)
struct
list_head
*
list
)
{
{
int
err
;
int
err
;
struct
list_head
middle
;
struct
ovl_readdir_data
rdd
=
{
struct
ovl_readdir_data
rdd
=
{
.
ctx
.
actor
=
ovl_fill_merge
,
.
ctx
.
actor
=
ovl_fill_merge
,
.
list
=
list
,
.
list
=
list
,
...
@@ -301,11 +300,10 @@ static inline int ovl_dir_read_merged(struct path *upperpath,
...
@@ -301,11 +300,10 @@ static inline int ovl_dir_read_merged(struct path *upperpath,
* Insert lowerpath entries before upperpath ones, this allows
* Insert lowerpath entries before upperpath ones, this allows
* offsets to be reasonably constant
* offsets to be reasonably constant
*/
*/
list_add
(
&
middle
,
rdd
.
list
);
list_add
(
&
rdd
.
middle
,
rdd
.
list
);
rdd
.
middle
=
&
middle
;
rdd
.
is_merge
=
true
;
rdd
.
is_merge
=
true
;
err
=
ovl_dir_read
(
lowerpath
,
&
rdd
);
err
=
ovl_dir_read
(
lowerpath
,
&
rdd
);
list_del
(
&
middle
);
list_del
(
&
rdd
.
middle
);
}
}
out:
out:
return
err
;
return
err
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment