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
c71dd880
Commit
c71dd880
authored
Mar 20, 2019
by
David Sterba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
btrfs: remove unused parameter fs_info from btrfs_extend_item
Signed-off-by:
David Sterba
<
dsterba@suse.com
>
parent
78ac4f9e
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
12 additions
and
17 deletions
+12
-17
fs/btrfs/ctree.c
fs/btrfs/ctree.c
+2
-3
fs/btrfs/ctree.h
fs/btrfs/ctree.h
+1
-2
fs/btrfs/dir-item.c
fs/btrfs/dir-item.c
+1
-1
fs/btrfs/extent-tree.c
fs/btrfs/extent-tree.c
+1
-1
fs/btrfs/file-item.c
fs/btrfs/file-item.c
+1
-1
fs/btrfs/inode-item.c
fs/btrfs/inode-item.c
+2
-2
fs/btrfs/tree-log.c
fs/btrfs/tree-log.c
+1
-3
fs/btrfs/uuid-tree.c
fs/btrfs/uuid-tree.c
+1
-1
fs/btrfs/xattr.c
fs/btrfs/xattr.c
+2
-3
No files found.
fs/btrfs/ctree.c
View file @
c71dd880
...
@@ -4639,8 +4639,7 @@ void btrfs_truncate_item(struct btrfs_path *path, u32 new_size, int from_end)
...
@@ -4639,8 +4639,7 @@ void btrfs_truncate_item(struct btrfs_path *path, u32 new_size, int from_end)
/*
/*
* make the item pointed to by the path bigger, data_size is the added size.
* make the item pointed to by the path bigger, data_size is the added size.
*/
*/
void
btrfs_extend_item
(
struct
btrfs_fs_info
*
fs_info
,
struct
btrfs_path
*
path
,
void
btrfs_extend_item
(
struct
btrfs_path
*
path
,
u32
data_size
)
u32
data_size
)
{
{
int
slot
;
int
slot
;
struct
extent_buffer
*
leaf
;
struct
extent_buffer
*
leaf
;
...
@@ -4669,7 +4668,7 @@ void btrfs_extend_item(struct btrfs_fs_info *fs_info, struct btrfs_path *path,
...
@@ -4669,7 +4668,7 @@ void btrfs_extend_item(struct btrfs_fs_info *fs_info, struct btrfs_path *path,
BUG_ON
(
slot
<
0
);
BUG_ON
(
slot
<
0
);
if
(
slot
>=
nritems
)
{
if
(
slot
>=
nritems
)
{
btrfs_print_leaf
(
leaf
);
btrfs_print_leaf
(
leaf
);
btrfs_crit
(
fs_info
,
"slot %d too large, nritems %d"
,
btrfs_crit
(
leaf
->
fs_info
,
"slot %d too large, nritems %d"
,
slot
,
nritems
);
slot
,
nritems
);
BUG
();
BUG
();
}
}
...
...
fs/btrfs/ctree.h
View file @
c71dd880
...
@@ -2930,8 +2930,7 @@ int btrfs_copy_root(struct btrfs_trans_handle *trans,
...
@@ -2930,8 +2930,7 @@ int btrfs_copy_root(struct btrfs_trans_handle *trans,
struct
extent_buffer
**
cow_ret
,
u64
new_root_objectid
);
struct
extent_buffer
**
cow_ret
,
u64
new_root_objectid
);
int
btrfs_block_can_be_shared
(
struct
btrfs_root
*
root
,
int
btrfs_block_can_be_shared
(
struct
btrfs_root
*
root
,
struct
extent_buffer
*
buf
);
struct
extent_buffer
*
buf
);
void
btrfs_extend_item
(
struct
btrfs_fs_info
*
fs_info
,
struct
btrfs_path
*
path
,
void
btrfs_extend_item
(
struct
btrfs_path
*
path
,
u32
data_size
);
u32
data_size
);
void
btrfs_truncate_item
(
struct
btrfs_path
*
path
,
u32
new_size
,
int
from_end
);
void
btrfs_truncate_item
(
struct
btrfs_path
*
path
,
u32
new_size
,
int
from_end
);
int
btrfs_split_item
(
struct
btrfs_trans_handle
*
trans
,
int
btrfs_split_item
(
struct
btrfs_trans_handle
*
trans
,
struct
btrfs_root
*
root
,
struct
btrfs_root
*
root
,
...
...
fs/btrfs/dir-item.c
View file @
c71dd880
...
@@ -36,7 +36,7 @@ static struct btrfs_dir_item *insert_with_overflow(struct btrfs_trans_handle
...
@@ -36,7 +36,7 @@ static struct btrfs_dir_item *insert_with_overflow(struct btrfs_trans_handle
di
=
btrfs_match_dir_item_name
(
fs_info
,
path
,
name
,
name_len
);
di
=
btrfs_match_dir_item_name
(
fs_info
,
path
,
name
,
name_len
);
if
(
di
)
if
(
di
)
return
ERR_PTR
(
-
EEXIST
);
return
ERR_PTR
(
-
EEXIST
);
btrfs_extend_item
(
fs_info
,
path
,
data_size
);
btrfs_extend_item
(
path
,
data_size
);
}
else
if
(
ret
<
0
)
}
else
if
(
ret
<
0
)
return
ERR_PTR
(
ret
);
return
ERR_PTR
(
ret
);
WARN_ON
(
ret
>
0
);
WARN_ON
(
ret
>
0
);
...
...
fs/btrfs/extent-tree.c
View file @
c71dd880
...
@@ -1705,7 +1705,7 @@ void setup_inline_extent_backref(struct btrfs_fs_info *fs_info,
...
@@ -1705,7 +1705,7 @@ void setup_inline_extent_backref(struct btrfs_fs_info *fs_info,
type
=
extent_ref_type
(
parent
,
owner
);
type
=
extent_ref_type
(
parent
,
owner
);
size
=
btrfs_extent_inline_ref_size
(
type
);
size
=
btrfs_extent_inline_ref_size
(
type
);
btrfs_extend_item
(
fs_info
,
path
,
size
);
btrfs_extend_item
(
path
,
size
);
ei
=
btrfs_item_ptr
(
leaf
,
path
->
slots
[
0
],
struct
btrfs_extent_item
);
ei
=
btrfs_item_ptr
(
leaf
,
path
->
slots
[
0
],
struct
btrfs_extent_item
);
refs
=
btrfs_extent_refs
(
leaf
,
ei
);
refs
=
btrfs_extent_refs
(
leaf
,
ei
);
...
...
fs/btrfs/file-item.c
View file @
c71dd880
...
@@ -848,7 +848,7 @@ int btrfs_csum_file_blocks(struct btrfs_trans_handle *trans,
...
@@ -848,7 +848,7 @@ int btrfs_csum_file_blocks(struct btrfs_trans_handle *trans,
diff
/=
csum_size
;
diff
/=
csum_size
;
diff
*=
csum_size
;
diff
*=
csum_size
;
btrfs_extend_item
(
fs_info
,
path
,
diff
);
btrfs_extend_item
(
path
,
diff
);
ret
=
0
;
ret
=
0
;
goto
csum
;
goto
csum
;
}
}
...
...
fs/btrfs/inode-item.c
View file @
c71dd880
...
@@ -288,7 +288,7 @@ static int btrfs_insert_inode_extref(struct btrfs_trans_handle *trans,
...
@@ -288,7 +288,7 @@ static int btrfs_insert_inode_extref(struct btrfs_trans_handle *trans,
name
,
name_len
,
NULL
))
name
,
name_len
,
NULL
))
goto
out
;
goto
out
;
btrfs_extend_item
(
root
->
fs_info
,
path
,
ins_len
);
btrfs_extend_item
(
path
,
ins_len
);
ret
=
0
;
ret
=
0
;
}
}
if
(
ret
<
0
)
if
(
ret
<
0
)
...
@@ -347,7 +347,7 @@ int btrfs_insert_inode_ref(struct btrfs_trans_handle *trans,
...
@@ -347,7 +347,7 @@ int btrfs_insert_inode_ref(struct btrfs_trans_handle *trans,
goto
out
;
goto
out
;
old_size
=
btrfs_item_size_nr
(
path
->
nodes
[
0
],
path
->
slots
[
0
]);
old_size
=
btrfs_item_size_nr
(
path
->
nodes
[
0
],
path
->
slots
[
0
]);
btrfs_extend_item
(
fs_info
,
path
,
ins_len
);
btrfs_extend_item
(
path
,
ins_len
);
ref
=
btrfs_item_ptr
(
path
->
nodes
[
0
],
path
->
slots
[
0
],
ref
=
btrfs_item_ptr
(
path
->
nodes
[
0
],
path
->
slots
[
0
],
struct
btrfs_inode_ref
);
struct
btrfs_inode_ref
);
ref
=
(
struct
btrfs_inode_ref
*
)((
unsigned
long
)
ref
+
old_size
);
ref
=
(
struct
btrfs_inode_ref
*
)((
unsigned
long
)
ref
+
old_size
);
...
...
fs/btrfs/tree-log.c
View file @
c71dd880
...
@@ -344,7 +344,6 @@ static noinline int overwrite_item(struct btrfs_trans_handle *trans,
...
@@ -344,7 +344,6 @@ static noinline int overwrite_item(struct btrfs_trans_handle *trans,
struct
extent_buffer
*
eb
,
int
slot
,
struct
extent_buffer
*
eb
,
int
slot
,
struct
btrfs_key
*
key
)
struct
btrfs_key
*
key
)
{
{
struct
btrfs_fs_info
*
fs_info
=
root
->
fs_info
;
int
ret
;
int
ret
;
u32
item_size
;
u32
item_size
;
u64
saved_i_size
=
0
;
u64
saved_i_size
=
0
;
...
@@ -467,8 +466,7 @@ static noinline int overwrite_item(struct btrfs_trans_handle *trans,
...
@@ -467,8 +466,7 @@ static noinline int overwrite_item(struct btrfs_trans_handle *trans,
if
(
found_size
>
item_size
)
if
(
found_size
>
item_size
)
btrfs_truncate_item
(
path
,
item_size
,
1
);
btrfs_truncate_item
(
path
,
item_size
,
1
);
else
if
(
found_size
<
item_size
)
else
if
(
found_size
<
item_size
)
btrfs_extend_item
(
fs_info
,
path
,
btrfs_extend_item
(
path
,
item_size
-
found_size
);
item_size
-
found_size
);
}
else
if
(
ret
)
{
}
else
if
(
ret
)
{
return
ret
;
return
ret
;
}
}
...
...
fs/btrfs/uuid-tree.c
View file @
c71dd880
...
@@ -121,7 +121,7 @@ int btrfs_uuid_tree_add(struct btrfs_trans_handle *trans, u8 *uuid, u8 type,
...
@@ -121,7 +121,7 @@ int btrfs_uuid_tree_add(struct btrfs_trans_handle *trans, u8 *uuid, u8 type,
* An item with that type already exists.
* An item with that type already exists.
* Extend the item and store the new subid at the end.
* Extend the item and store the new subid at the end.
*/
*/
btrfs_extend_item
(
fs_info
,
path
,
sizeof
(
subid_le
));
btrfs_extend_item
(
path
,
sizeof
(
subid_le
));
eb
=
path
->
nodes
[
0
];
eb
=
path
->
nodes
[
0
];
slot
=
path
->
slots
[
0
];
slot
=
path
->
slots
[
0
];
offset
=
btrfs_item_ptr_offset
(
eb
,
slot
);
offset
=
btrfs_item_ptr_offset
(
eb
,
slot
);
...
...
fs/btrfs/xattr.c
View file @
c71dd880
...
@@ -185,8 +185,7 @@ int btrfs_setxattr(struct btrfs_trans_handle *trans, struct inode *inode,
...
@@ -185,8 +185,7 @@ int btrfs_setxattr(struct btrfs_trans_handle *trans, struct inode *inode,
if
(
old_data_len
+
name_len
+
sizeof
(
*
di
)
==
item_size
)
{
if
(
old_data_len
+
name_len
+
sizeof
(
*
di
)
==
item_size
)
{
/* No other xattrs packed in the same leaf item. */
/* No other xattrs packed in the same leaf item. */
if
(
size
>
old_data_len
)
if
(
size
>
old_data_len
)
btrfs_extend_item
(
fs_info
,
path
,
btrfs_extend_item
(
path
,
size
-
old_data_len
);
size
-
old_data_len
);
else
if
(
size
<
old_data_len
)
else
if
(
size
<
old_data_len
)
btrfs_truncate_item
(
path
,
data_size
,
1
);
btrfs_truncate_item
(
path
,
data_size
,
1
);
}
else
{
}
else
{
...
@@ -194,7 +193,7 @@ int btrfs_setxattr(struct btrfs_trans_handle *trans, struct inode *inode,
...
@@ -194,7 +193,7 @@ int btrfs_setxattr(struct btrfs_trans_handle *trans, struct inode *inode,
ret
=
btrfs_delete_one_dir_name
(
trans
,
root
,
path
,
di
);
ret
=
btrfs_delete_one_dir_name
(
trans
,
root
,
path
,
di
);
if
(
ret
)
if
(
ret
)
goto
out
;
goto
out
;
btrfs_extend_item
(
fs_info
,
path
,
data_size
);
btrfs_extend_item
(
path
,
data_size
);
}
}
item
=
btrfs_item_nr
(
slot
);
item
=
btrfs_item_nr
(
slot
);
...
...
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