mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-03-19 05:24:11 +00:00
btrfs: remove inode argument from add_pending_csums
It's used to reference the csum root which can be done from the trans handle as well. Simplify the signature and while at it also remove the noinline attribute as the function uses only at most 16 bytes of stack space. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
3c38c877fc
commit
510f85edf1
1 changed files with 4 additions and 5 deletions
|
@ -2246,16 +2246,15 @@ out:
|
||||||
* given a list of ordered sums record them in the inode. This happens
|
* given a list of ordered sums record them in the inode. This happens
|
||||||
* at IO completion time based on sums calculated at bio submission time.
|
* at IO completion time based on sums calculated at bio submission time.
|
||||||
*/
|
*/
|
||||||
static noinline int add_pending_csums(struct btrfs_trans_handle *trans,
|
static int add_pending_csums(struct btrfs_trans_handle *trans,
|
||||||
struct inode *inode, struct list_head *list)
|
struct list_head *list)
|
||||||
{
|
{
|
||||||
struct btrfs_ordered_sum *sum;
|
struct btrfs_ordered_sum *sum;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
list_for_each_entry(sum, list, list) {
|
list_for_each_entry(sum, list, list) {
|
||||||
trans->adding_csums = true;
|
trans->adding_csums = true;
|
||||||
ret = btrfs_csum_file_blocks(trans,
|
ret = btrfs_csum_file_blocks(trans, trans->fs_info->csum_root, sum);
|
||||||
BTRFS_I(inode)->root->fs_info->csum_root, sum);
|
|
||||||
trans->adding_csums = false;
|
trans->adding_csums = false;
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -2683,7 +2682,7 @@ static int btrfs_finish_ordered_io(struct btrfs_ordered_extent *ordered_extent)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = add_pending_csums(trans, inode, &ordered_extent->list);
|
ret = add_pending_csums(trans, &ordered_extent->list);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
btrfs_abort_transaction(trans, ret);
|
btrfs_abort_transaction(trans, ret);
|
||||||
goto out;
|
goto out;
|
||||||
|
|
Loading…
Add table
Reference in a new issue