diff options
author | Chris Mason <clm@fb.com> | 2016-03-01 19:13:56 +0300 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2016-03-01 19:13:56 +0300 |
commit | c05c5ee5ea40fe40df5e29471f583a0eb7c531e3 (patch) | |
tree | c56a3336bf631d9e97f038f1253e8e99726eb3e5 /fs/btrfs/backref.c | |
parent | fc77dbd34c5c99bce46d40a2491937c3bcbd10af (diff) | |
parent | f5bc27c71a1b0741cb93dbec0f216b012b21d93f (diff) | |
download | linux-c05c5ee5ea40fe40df5e29471f583a0eb7c531e3.tar.xz |
Merge tag 'for-chris' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into for-linus-4.6
Btrfs patchsets for 4.6
Diffstat (limited to 'fs/btrfs/backref.c')
-rw-r--r-- | fs/btrfs/backref.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c index f6dac40f87ff..80e8472d618b 100644 --- a/fs/btrfs/backref.c +++ b/fs/btrfs/backref.c @@ -148,8 +148,7 @@ int __init btrfs_prelim_ref_init(void) void btrfs_prelim_ref_exit(void) { - if (btrfs_prelim_ref_cache) - kmem_cache_destroy(btrfs_prelim_ref_cache); + kmem_cache_destroy(btrfs_prelim_ref_cache); } /* @@ -566,17 +565,14 @@ static void __merge_refs(struct list_head *head, int mode) struct __prelim_ref *pos2 = pos1, *tmp; list_for_each_entry_safe_continue(pos2, tmp, head, list) { - struct __prelim_ref *xchg, *ref1 = pos1, *ref2 = pos2; + struct __prelim_ref *ref1 = pos1, *ref2 = pos2; struct extent_inode_elem *eie; if (!ref_for_same_block(ref1, ref2)) continue; if (mode == 1) { - if (!ref1->parent && ref2->parent) { - xchg = ref1; - ref1 = ref2; - ref2 = xchg; - } + if (!ref1->parent && ref2->parent) + swap(ref1, ref2); } else { if (ref1->parent != ref2->parent) continue; |