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
856bf3e5
Commit
856bf3e5
authored
Nov 08, 2007
by
Chris Mason
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Btrfs: Avoid extent_buffer lru corruption
Signed-off-by:
Chris Mason
<
chris.mason@oracle.com
>
parent
257d0ce3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
fs/btrfs/extent_map.c
fs/btrfs/extent_map.c
+7
-1
No files found.
fs/btrfs/extent_map.c
View file @
856bf3e5
...
...
@@ -2047,7 +2047,7 @@ static int add_lru(struct extent_map_tree *tree, struct extent_buffer *eb)
rm
=
list_entry
(
tree
->
buffer_lru
.
prev
,
struct
extent_buffer
,
lru
);
tree
->
lru_size
--
;
list_del
(
&
rm
->
lru
);
list_del
_init
(
&
rm
->
lru
);
free_extent_buffer
(
rm
);
}
}
else
...
...
@@ -2187,6 +2187,9 @@ lru_add:
return
eb
;
fail:
spin_lock
(
&
tree
->
lru_lock
);
list_del_init
(
&
eb
->
lru
);
spin_unlock
(
&
tree
->
lru_lock
);
if
(
!
atomic_dec_and_test
(
&
eb
->
refs
))
return
NULL
;
for
(
index
=
0
;
index
<
i
;
index
++
)
{
...
...
@@ -2246,6 +2249,9 @@ lru_add:
spin_unlock
(
&
tree
->
lru_lock
);
return
eb
;
fail:
spin_lock
(
&
tree
->
lru_lock
);
list_del_init
(
&
eb
->
lru
);
spin_unlock
(
&
tree
->
lru_lock
);
if
(
!
atomic_dec_and_test
(
&
eb
->
refs
))
return
NULL
;
for
(
index
=
0
;
index
<
i
;
index
++
)
{
...
...
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