Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
a6a8bef7
Commit
a6a8bef7
authored
May 29, 2006
by
David Woodhouse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[JFFS2] Preallocate raw_node_refs in a couple of missing places in scan
Signed-off-by:
David Woodhouse
<
dwmw2@infradead.org
>
parent
2ebf09c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
fs/jffs2/scan.c
fs/jffs2/scan.c
+7
-2
No files found.
fs/jffs2/scan.c
View file @
a6a8bef7
...
@@ -67,8 +67,11 @@ static inline uint32_t EMPTY_SCAN_SIZE(uint32_t sector_size) {
...
@@ -67,8 +67,11 @@ static inline uint32_t EMPTY_SCAN_SIZE(uint32_t sector_size) {
static
int
file_dirty
(
struct
jffs2_sb_info
*
c
,
struct
jffs2_eraseblock
*
jeb
)
static
int
file_dirty
(
struct
jffs2_sb_info
*
c
,
struct
jffs2_eraseblock
*
jeb
)
{
{
int
ret
=
jffs2_scan_dirty_space
(
c
,
jeb
,
jeb
->
free_size
);
int
ret
;
if
(
ret
)
if
((
ret
=
jffs2_prealloc_raw_node_refs
(
c
,
jeb
,
1
)))
return
ret
;
if
((
ret
=
jffs2_scan_dirty_space
(
c
,
jeb
,
jeb
->
free_size
)))
return
ret
;
return
ret
;
/* Turned wasted size into dirty, since we apparently
/* Turned wasted size into dirty, since we apparently
think it's recoverable now. */
think it's recoverable now. */
...
@@ -559,6 +562,8 @@ static int jffs2_scan_eraseblock (struct jffs2_sb_info *c, struct jffs2_eraseblo
...
@@ -559,6 +562,8 @@ static int jffs2_scan_eraseblock (struct jffs2_sb_info *c, struct jffs2_eraseblo
if
(
ofs
)
{
if
(
ofs
)
{
D1
(
printk
(
KERN_DEBUG
"Free space at %08x ends at %08x
\n
"
,
jeb
->
offset
,
D1
(
printk
(
KERN_DEBUG
"Free space at %08x ends at %08x
\n
"
,
jeb
->
offset
,
jeb
->
offset
+
ofs
));
jeb
->
offset
+
ofs
));
if
((
err
=
jffs2_prealloc_raw_node_refs
(
c
,
jeb
,
1
)))
return
err
;
if
((
err
=
jffs2_scan_dirty_space
(
c
,
jeb
,
ofs
)))
if
((
err
=
jffs2_scan_dirty_space
(
c
,
jeb
,
ofs
)))
return
err
;
return
err
;
}
}
...
...
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