btrfs: squash lines for simple wrapper functions
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Mon, 12 Sep 2016 19:35:52 +0000 (04:35 +0900)
committerDavid Sterba <dsterba@suse.com>
Mon, 26 Sep 2016 16:08:38 +0000 (18:08 +0200)
Remove unneeded variables and assignments.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/check-integrity.c
fs/btrfs/ctree.c
fs/btrfs/delayed-inode.c
fs/btrfs/extent-tree.c
fs/btrfs/send.c

index 66789471b49dc1dc14d1e473a71b2b03d73fa2fc..183c98f58e82fce10e00a50c37708ce81b1bf46f 100644 (file)
@@ -2849,11 +2849,8 @@ static void btrfsic_cmp_log_and_dev_bytenr(struct btrfsic_state *state,
 static struct btrfsic_dev_state *btrfsic_dev_state_lookup(
                struct block_device *bdev)
 {
-       struct btrfsic_dev_state *ds;
-
-       ds = btrfsic_dev_state_hashtable_lookup(bdev,
-                                               &btrfsic_dev_state_hashtable);
-       return ds;
+       return btrfsic_dev_state_hashtable_lookup(bdev,
+                                                 &btrfsic_dev_state_hashtable);
 }
 
 int btrfsic_submit_bh(int op, int op_flags, struct buffer_head *bh)
index dcd39cca7e43dbfa9e1d964b8aaedc0002e57c32..494e6b17bebdb90b93115b660703ab789210c7b1 100644 (file)
@@ -45,9 +45,7 @@ static int tree_mod_log_free_eb(struct btrfs_fs_info *fs_info,
 
 struct btrfs_path *btrfs_alloc_path(void)
 {
-       struct btrfs_path *path;
-       path = kmem_cache_zalloc(btrfs_path_cachep, GFP_NOFS);
-       return path;
+       return kmem_cache_zalloc(btrfs_path_cachep, GFP_NOFS);
 }
 
 /*
index 982a168af2cea776fa99a54090b6b1d69bb0b01b..143f551f688c47a1e2a9fd698104c0bf6094e73c 100644 (file)
@@ -385,11 +385,8 @@ static struct btrfs_delayed_item *__btrfs_lookup_delayed_insertion_item(
                                        struct btrfs_delayed_node *delayed_node,
                                        struct btrfs_key *key)
 {
-       struct btrfs_delayed_item *item;
-
-       item = __btrfs_lookup_delayed_item(&delayed_node->ins_root, key,
+       return __btrfs_lookup_delayed_item(&delayed_node->ins_root, key,
                                           NULL, NULL);
-       return item;
 }
 
 static int __btrfs_add_delayed_item(struct btrfs_delayed_node *delayed_node,
index 3e360132a2b7c0daec53dd1d65f5ccfe010517eb..73fb91f9d797c2b2ea4f4b744d7ee7169e1e70ed 100644 (file)
@@ -730,11 +730,7 @@ static int cache_block_group(struct btrfs_block_group_cache *cache,
 static struct btrfs_block_group_cache *
 btrfs_lookup_first_block_group(struct btrfs_fs_info *info, u64 bytenr)
 {
-       struct btrfs_block_group_cache *cache;
-
-       cache = block_group_cache_tree_search(info, bytenr, 0);
-
-       return cache;
+       return block_group_cache_tree_search(info, bytenr, 0);
 }
 
 /*
@@ -744,11 +740,7 @@ struct btrfs_block_group_cache *btrfs_lookup_block_group(
                                                 struct btrfs_fs_info *info,
                                                 u64 bytenr)
 {
-       struct btrfs_block_group_cache *cache;
-
-       cache = block_group_cache_tree_search(info, bytenr, 1);
-
-       return cache;
+       return block_group_cache_tree_search(info, bytenr, 1);
 }
 
 static struct btrfs_space_info *__find_space_info(struct btrfs_fs_info *info,
index a87675ffd02b33a9766eb229eea2b3b4200b783e..bc7185c20f32b63b522748bbb10dfd7dd18b04bf 100644 (file)
@@ -4398,12 +4398,8 @@ static int process_new_xattr(struct send_ctx *sctx)
 
 static int process_deleted_xattr(struct send_ctx *sctx)
 {
-       int ret;
-
-       ret = iterate_dir_item(sctx->parent_root, sctx->right_path,
-                              sctx->cmp_key, __process_deleted_xattr, sctx);
-
-       return ret;
+       return iterate_dir_item(sctx->parent_root, sctx->right_path,
+                               sctx->cmp_key, __process_deleted_xattr, sctx);
 }
 
 struct find_xattr_ctx {