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
c67cda17
Commit
c67cda17
authored
Oct 29, 2007
by
Yan
Committed by
Chris Mason
Sep 25, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Btrfs: Fix extent_map leak in extent_bmap
Signed-off-by:
Chris Mason
<
chris.mason@oracle.com
>
parent
44ec0b71
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
fs/btrfs/extent_map.c
fs/btrfs/extent_map.c
+6
-2
No files found.
fs/btrfs/extent_map.c
View file @
c67cda17
...
...
@@ -1924,6 +1924,7 @@ sector_t extent_bmap(struct address_space *mapping, sector_t iblock,
struct
inode
*
inode
=
mapping
->
host
;
u64
start
=
iblock
<<
inode
->
i_blkbits
;
u64
end
=
start
+
(
1
<<
inode
->
i_blkbits
)
-
1
;
sector_t
sector
=
0
;
struct
extent_map
*
em
;
em
=
get_extent
(
inode
,
NULL
,
0
,
start
,
end
,
0
);
...
...
@@ -1932,9 +1933,12 @@ sector_t extent_bmap(struct address_space *mapping, sector_t iblock,
if
(
em
->
block_start
==
EXTENT_MAP_INLINE
||
em
->
block_start
==
EXTENT_MAP_HOLE
)
return
0
;
goto
out
;
return
(
em
->
block_start
+
start
-
em
->
start
)
>>
inode
->
i_blkbits
;
sector
=
(
em
->
block_start
+
start
-
em
->
start
)
>>
inode
->
i_blkbits
;
out:
free_extent_map
(
em
);
return
sector
;
}
static
int
add_lru
(
struct
extent_map_tree
*
tree
,
struct
extent_buffer
*
eb
)
...
...
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