diff mbox

PATCH 3/3] btrfs: set extent-tree.c/add_excluded_extent as void

Message ID 5048458A.1030604@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Wang Sheng-Hui Sept. 6, 2012, 6:41 a.m. UTC
The memory allocation failure will be catched in set_extent_bits.
Always return 0 is useless for its callers.

Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
---
 fs/btrfs/extent-tree.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 9b9a6fa..3a295ff 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -209,7 +209,7 @@  block_group_cache_tree_search(struct btrfs_fs_info *info, u64 bytenr,
 	return ret;
 }
 
-static int add_excluded_extent(struct btrfs_root *root,
+static void add_excluded_extent(struct btrfs_root *root,
 			       u64 start, u64 num_bytes)
 {
 	u64 end = start + num_bytes - 1;
@@ -217,7 +217,6 @@  static int add_excluded_extent(struct btrfs_root *root,
 			start, end, EXTENT_UPTODATE, GFP_NOFS);
 	set_extent_bits(&root->fs_info->freed_extents[1],
 			start, end, EXTENT_UPTODATE, GFP_NOFS);
-	return 0;
 }
 
 static void free_excluded_extents(struct btrfs_root *root,