Btrfs: make __merge_refs() return type be void
authorWang Shilong <wangsl-fnst@cn.fujitsu.com>
Thu, 11 Apr 2013 07:08:55 +0000 (07:08 +0000)
committerJosef Bacik <jbacik@fusionio.com>
Mon, 6 May 2013 19:54:43 +0000 (15:54 -0400)
__merge_refs() always return 0, it is unnecessary
for the caller to check the return value.

Signed-off-by: Wang Shilong <wangsl-fnst@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/backref.c

index 66f44c7534d0e869efdf71d558d277be3a42d15e..7f448b8325a1d1c2917d163cc85cf45547c08b9f 100644 (file)
@@ -443,7 +443,7 @@ static int __add_missing_keys(struct btrfs_fs_info *fs_info,
  *           having a parent).
  * mode = 2: merge identical parents
  */
-static int __merge_refs(struct list_head *head, int mode)
+static void __merge_refs(struct list_head *head, int mode)
 {
        struct list_head *pos1;
 
@@ -489,7 +489,6 @@ static int __merge_refs(struct list_head *head, int mode)
                }
 
        }
-       return 0;
 }
 
 /*
@@ -884,18 +883,14 @@ again:
        if (ret)
                goto out;
 
-       ret = __merge_refs(&prefs, 1);
-       if (ret)
-               goto out;
+       __merge_refs(&prefs, 1);
 
        ret = __resolve_indirect_refs(fs_info, search_commit_root, time_seq,
                                      &prefs, extent_item_pos);
        if (ret)
                goto out;
 
-       ret = __merge_refs(&prefs, 2);
-       if (ret)
-               goto out;
+       __merge_refs(&prefs, 2);
 
        while (!list_empty(&prefs)) {
                ref = list_first_entry(&prefs, struct __prelim_ref, list);