aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorQinghuang Feng <qhfeng.kernel@gmail.com>2009-01-21 10:59:08 -0500
committerChris Mason <chris.mason@oracle.com>2009-01-21 10:59:08 -0500
commitc6e308713a47527f88a277ee95b7c5d1db80f77b (patch)
tree0a890bb3ac2ae1bb8733cf8679d1441e1b85eb81 /fs/btrfs/inode.c
parent57506d50ed6db7b0e7ddc9845e86e81f140983d5 (diff)
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>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 44dbd550c4bd..45cf03ee1bc2 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -1323,12 +1323,11 @@ static noinline int add_pending_csums(struct btrfs_trans_handle *trans,
1323 struct inode *inode, u64 file_offset, 1323 struct inode *inode, u64 file_offset,
1324 struct list_head *list) 1324 struct list_head *list)
1325{ 1325{
1326 struct list_head *cur;
1327 struct btrfs_ordered_sum *sum; 1326 struct btrfs_ordered_sum *sum;
1328 1327
1329 btrfs_set_trans_block_group(trans, inode); 1328 btrfs_set_trans_block_group(trans, inode);
1330 list_for_each(cur, list) { 1329
1331 sum = list_entry(cur, struct btrfs_ordered_sum, list); 1330 list_for_each_entry(sum, list, list) {
1332 btrfs_csum_file_blocks(trans, 1331 btrfs_csum_file_blocks(trans,
1333 BTRFS_I(inode)->root->fs_info->csum_root, sum); 1332 BTRFS_I(inode)->root->fs_info->csum_root, sum);
1334 } 1333 }