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
a1f39630
Commit
a1f39630
authored
Jul 11, 2007
by
Aneesh
Committed by
David Woodhouse
Jul 11, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Btrfs: Some code cleanups
Signed-off-by:
Chris Mason
<
chris.mason@oracle.com
>
parent
ec6b910f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
fs/btrfs/ctree.c
fs/btrfs/ctree.c
+6
-2
fs/btrfs/root-tree.c
fs/btrfs/root-tree.c
+2
-2
No files found.
fs/btrfs/ctree.c
View file @
a1f39630
...
...
@@ -172,11 +172,13 @@ static int check_node(struct btrfs_root *root, struct btrfs_path *path,
if
(
path
->
nodes
[
level
+
1
])
parent
=
btrfs_buffer_node
(
path
->
nodes
[
level
+
1
]);
parent_slot
=
path
->
slots
[
level
+
1
];
slot
=
path
->
slots
[
level
];
BUG_ON
(
nritems
==
0
);
if
(
parent
)
{
struct
btrfs_disk_key
*
parent_key
;
parent_slot
=
path
->
slots
[
level
+
1
];
parent_key
=
&
parent
->
ptrs
[
parent_slot
].
key
;
BUG_ON
(
memcmp
(
parent_key
,
&
node
->
ptrs
[
0
].
key
,
sizeof
(
struct
btrfs_disk_key
)));
...
...
@@ -208,7 +210,7 @@ static int check_leaf(struct btrfs_root *root, struct btrfs_path *path,
if
(
path
->
nodes
[
level
+
1
])
parent
=
btrfs_buffer_node
(
path
->
nodes
[
level
+
1
]);
parent_slot
=
path
->
slots
[
level
+
1
];
BUG_ON
(
btrfs_leaf_free_space
(
root
,
leaf
)
<
0
);
if
(
nritems
==
0
)
...
...
@@ -216,6 +218,8 @@ static int check_leaf(struct btrfs_root *root, struct btrfs_path *path,
if
(
parent
)
{
struct
btrfs_disk_key
*
parent_key
;
parent_slot
=
path
->
slots
[
level
+
1
];
parent_key
=
&
parent
->
ptrs
[
parent_slot
].
key
;
BUG_ON
(
memcmp
(
parent_key
,
&
leaf
->
items
[
0
].
key
,
sizeof
(
struct
btrfs_disk_key
)));
...
...
fs/btrfs/root-tree.c
View file @
a1f39630
...
...
@@ -135,8 +135,8 @@ int btrfs_find_dead_roots(struct btrfs_root *root)
if
(
btrfs_root_refs
(
ri
)
!=
0
)
goto
next
;
dead_root
=
btrfs_read_fs_root_no_radix
(
root
->
fs_info
,
&
key
);
if
(
IS_ERR
(
root
))
{
ret
=
PTR_ERR
(
root
);
if
(
IS_ERR
(
dead_
root
))
{
ret
=
PTR_ERR
(
dead_
root
);
goto
err
;
}
ret
=
btrfs_add_dead_root
(
dead_root
,
...
...
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