summaryrefslogtreecommitdiff
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)
downloadlwn-c6e308713a47527f88a277ee95b7c5d1db80f77b.tar.gz
lwn-c6e308713a47527f88a277ee95b7c5d1db80f77b.zip
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,
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);
}