btrfs: return void in functions without error conditions
[deliverable/linux.git] / fs / btrfs / dir-item.c
index 31d84e78129b34adaac7a1ec25368e8c3212403d..76743308bd9f074baf530d95d1c637af1cf5fcba 100644 (file)
@@ -49,9 +49,8 @@ static struct btrfs_dir_item *insert_with_overflow(struct btrfs_trans_handle
                di = btrfs_match_dir_item_name(root, path, name, name_len);
                if (di)
                        return ERR_PTR(-EEXIST);
-               ret = btrfs_extend_item(trans, root, path, data_size);
-       }
-       if (ret < 0)
+               btrfs_extend_item(trans, root, path, data_size);
+       } else if (ret < 0)
                return ERR_PTR(ret);
        WARN_ON(ret > 0);
        leaf = path->nodes[0];
@@ -383,8 +382,8 @@ int btrfs_delete_one_dir_name(struct btrfs_trans_handle *trans,
                start = btrfs_item_ptr_offset(leaf, path->slots[0]);
                memmove_extent_buffer(leaf, ptr, ptr + sub_item_len,
                        item_len - (ptr + sub_item_len - start));
-               ret = btrfs_truncate_item(trans, root, path,
-                                         item_len - sub_item_len, 1);
+               btrfs_truncate_item(trans, root, path,
+                                   item_len - sub_item_len, 1);
        }
        return ret;
 }
This page took 0.02513 seconds and 5 git commands to generate.