Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
21f1d5fc
Commit
21f1d5fc
authored
Apr 21, 2006
by
David Woodhouse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[RBTREE] Update JFFS2 to use rb_parent() accessor macro.
Signed-off-by:
David Woodhouse
<
dwmw2@infradead.org
>
parent
c569882b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
10 deletions
+9
-10
fs/jffs2/nodelist.h
fs/jffs2/nodelist.h
+0
-1
fs/jffs2/readinode.c
fs/jffs2/readinode.c
+9
-9
No files found.
fs/jffs2/nodelist.h
View file @
21f1d5fc
...
...
@@ -299,7 +299,6 @@ static inline struct jffs2_node_frag *frag_last(struct rb_root *root)
return
rb_entry
(
node
,
struct
jffs2_node_frag
,
rb
);
}
#define rb_parent(rb) ((rb)->rb_parent)
#define frag_next(frag) rb_entry(rb_next(&(frag)->rb), struct jffs2_node_frag, rb)
#define frag_prev(frag) rb_entry(rb_prev(&(frag)->rb), struct jffs2_node_frag, rb)
#define frag_parent(frag) rb_entry(rb_parent(&(frag)->rb), struct jffs2_node_frag, rb)
...
...
fs/jffs2/readinode.c
View file @
21f1d5fc
...
...
@@ -66,7 +66,7 @@ static void jffs2_free_tmp_dnode_info_list(struct rb_root *list)
jffs2_free_full_dnode
(
tn
->
fn
);
jffs2_free_tmp_dnode_info
(
tn
);
this
=
this
->
rb_parent
;
this
=
rb_parent
(
this
)
;
if
(
!
this
)
break
;
...
...
@@ -679,12 +679,12 @@ static int jffs2_do_read_inode_internal(struct jffs2_sb_info *c,
jffs2_mark_node_obsolete
(
c
,
fn
->
raw
);
BUG_ON
(
rb
->
rb_left
);
if
(
rb
->
rb_parent
&&
rb
->
rb_parent
->
rb_left
==
rb
)
{
if
(
rb
_parent
(
rb
)
&&
rb_parent
(
rb
)
->
rb_left
==
rb
)
{
/* We were then left-hand child of our parent. We need
* to move our own right-hand child into our place. */
repl_rb
=
rb
->
rb_right
;
if
(
repl_rb
)
r
epl_rb
->
rb_parent
=
rb
->
rb_parent
;
r
b_set_parent
(
repl_rb
,
rb_parent
(
rb
))
;
}
else
repl_rb
=
NULL
;
...
...
@@ -692,14 +692,14 @@ static int jffs2_do_read_inode_internal(struct jffs2_sb_info *c,
/* Remove the spent tn from the tree; don't bother rebalancing
* but put our right-hand child in our own place. */
if
(
tn
->
rb
.
rb_parent
)
{
if
(
tn
->
rb
.
rb_parent
->
rb_left
==
&
tn
->
rb
)
tn
->
rb
.
rb_parent
->
rb_left
=
repl_rb
;
else
if
(
tn
->
rb
.
rb_parent
->
rb_right
==
&
tn
->
rb
)
tn
->
rb
.
rb_parent
->
rb_right
=
repl_rb
;
if
(
rb_parent
(
&
tn
->
rb
)
)
{
if
(
rb_parent
(
&
tn
->
rb
)
->
rb_left
==
&
tn
->
rb
)
rb_parent
(
&
tn
->
rb
)
->
rb_left
=
repl_rb
;
else
if
(
rb_parent
(
&
tn
->
rb
)
->
rb_right
==
&
tn
->
rb
)
rb_parent
(
&
tn
->
rb
)
->
rb_right
=
repl_rb
;
else
BUG
();
}
else
if
(
tn
->
rb
.
rb_right
)
tn
->
rb
.
rb_right
->
rb_parent
=
NULL
;
rb_set_parent
(
tn
->
rb
.
rb_right
,
NULL
)
;
jffs2_free_tmp_dnode_info
(
tn
);
if
(
ret
)
{
...
...
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