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
e644d021
Commit
e644d021
authored
Nov 06, 2007
by
Chris Mason
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix recursive KM_USER1 usage in btrfs_realloc_node
Signed-off-by:
Chris Mason
<
chris.mason@oracle.com
>
parent
f84a8b36
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
8 deletions
+19
-8
fs/btrfs/ctree.h
fs/btrfs/ctree.h
+3
-8
fs/btrfs/struct-funcs.c
fs/btrfs/struct-funcs.c
+16
-0
No files found.
fs/btrfs/ctree.h
View file @
e644d021
...
@@ -557,14 +557,9 @@ static inline unsigned long btrfs_node_key_ptr_offset(int nr)
...
@@ -557,14 +557,9 @@ static inline unsigned long btrfs_node_key_ptr_offset(int nr)
sizeof
(
struct
btrfs_key_ptr
)
*
nr
;
sizeof
(
struct
btrfs_key_ptr
)
*
nr
;
}
}
static
inline
void
btrfs_node_key
(
struct
extent_buffer
*
eb
,
void
btrfs_node_key
(
struct
extent_buffer
*
eb
,
struct
btrfs_disk_key
*
disk_key
,
int
nr
)
struct
btrfs_disk_key
*
disk_key
,
int
nr
);
{
unsigned
long
ptr
;
ptr
=
btrfs_node_key_ptr_offset
(
nr
);
read_eb_member
(
eb
,
(
struct
btrfs_key_ptr
*
)
ptr
,
struct
btrfs_key_ptr
,
key
,
disk_key
);
}
static
inline
void
btrfs_set_node_key
(
struct
extent_buffer
*
eb
,
static
inline
void
btrfs_set_node_key
(
struct
extent_buffer
*
eb
,
struct
btrfs_disk_key
*
disk_key
,
int
nr
)
struct
btrfs_disk_key
*
disk_key
,
int
nr
)
{
{
...
...
fs/btrfs/struct-funcs.c
View file @
e644d021
...
@@ -95,3 +95,19 @@ void btrfs_set_##name(struct extent_buffer *eb, \
...
@@ -95,3 +95,19 @@ void btrfs_set_##name(struct extent_buffer *eb, \
#include "ctree.h"
#include "ctree.h"
void
btrfs_node_key
(
struct
extent_buffer
*
eb
,
struct
btrfs_disk_key
*
disk_key
,
int
nr
)
{
unsigned
long
ptr
=
btrfs_node_key_ptr_offset
(
nr
);
if
(
eb
->
map_token
&&
ptr
>=
eb
->
map_start
&&
ptr
+
sizeof
(
*
disk_key
)
<=
eb
->
map_start
+
eb
->
map_len
)
{
memcpy
(
disk_key
,
eb
->
kaddr
+
ptr
-
eb
->
map_start
,
sizeof
(
*
disk_key
));
return
;
}
else
if
(
eb
->
map_token
)
{
unmap_extent_buffer
(
eb
,
eb
->
map_token
,
KM_USER1
);
eb
->
map_token
=
NULL
;
}
read_eb_member
(
eb
,
(
struct
btrfs_key_ptr
*
)
ptr
,
struct
btrfs_key_ptr
,
key
,
disk_key
);
}
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