mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
Btrfs: simplify iteration codes
Merge list_for_each* and list_entry to list_for_each_entry* Signed-off-by: Qinghuang Feng <qhfeng.kernel@gmail.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
parent
57506d50ed
commit
c6e308713a
6 changed files with 19 additions and 52 deletions
|
@ -1323,12 +1323,11 @@ static noinline int add_pending_csums(struct btrfs_trans_handle *trans,
|
|||
struct inode *inode, u64 file_offset,
|
||||
struct list_head *list)
|
||||
{
|
||||
struct list_head *cur;
|
||||
struct btrfs_ordered_sum *sum;
|
||||
|
||||
btrfs_set_trans_block_group(trans, inode);
|
||||
list_for_each(cur, list) {
|
||||
sum = list_entry(cur, struct btrfs_ordered_sum, list);
|
||||
|
||||
list_for_each_entry(sum, list, list) {
|
||||
btrfs_csum_file_blocks(trans,
|
||||
BTRFS_I(inode)->root->fs_info->csum_root, sum);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue