aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent_io.c
diff options
context:
space:
mode:
authorPeter <htmldeveloper@gmail.com>2008-04-01 11:21:40 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:01 -0400
commit2b114d1d33551ab1dcaa1d0b3a956df3776fb767 (patch)
treedcc5b37532bc1ac65844e18e258801cfc6353940 /fs/btrfs/extent_io.c
parente58ca0203d32869a01540a293df40ddc480dc378 (diff)
Btrfs: Correct usage of IS_ERR() in extent_io.c
Signed-off-by: Peter Teoh <htmldeveloper@gmail.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r--fs/btrfs/extent_io.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index b99cfabd008e..776c33f1e6fe 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -120,7 +120,7 @@ struct extent_state *alloc_extent_state(gfp_t mask)
120 unsigned long flags; 120 unsigned long flags;
121 121
122 state = kmem_cache_alloc(extent_state_cache, mask); 122 state = kmem_cache_alloc(extent_state_cache, mask);
123 if (!state || IS_ERR(state)) 123 if (!state)
124 return state; 124 return state;
125 state->state = 0; 125 state->state = 0;
126 state->private = 0; 126 state->private = 0;
@@ -957,7 +957,7 @@ int find_first_extent_bit(struct extent_io_tree *tree, u64 start,
957 * our range starts. 957 * our range starts.
958 */ 958 */
959 node = tree_search(tree, start); 959 node = tree_search(tree, start);
960 if (!node || IS_ERR(node)) { 960 if (!node) {
961 goto out; 961 goto out;
962 } 962 }
963 963
@@ -990,7 +990,7 @@ struct extent_state *find_first_extent_bit_state(struct extent_io_tree *tree,
990 * our range starts. 990 * our range starts.
991 */ 991 */
992 node = tree_search(tree, start); 992 node = tree_search(tree, start);
993 if (!node || IS_ERR(node)) { 993 if (!node) {
994 goto out; 994 goto out;
995 } 995 }
996 996
@@ -1024,7 +1024,7 @@ u64 find_lock_delalloc_range(struct extent_io_tree *tree,
1024 */ 1024 */
1025search_again: 1025search_again:
1026 node = tree_search(tree, cur_start); 1026 node = tree_search(tree, cur_start);
1027 if (!node || IS_ERR(node)) { 1027 if (!node) {
1028 *end = (u64)-1; 1028 *end = (u64)-1;
1029 goto out; 1029 goto out;
1030 } 1030 }
@@ -1112,7 +1112,7 @@ u64 count_range_bits(struct extent_io_tree *tree,
1112 * our range starts. 1112 * our range starts.
1113 */ 1113 */
1114 node = tree_search(tree, cur_start); 1114 node = tree_search(tree, cur_start);
1115 if (!node || IS_ERR(node)) { 1115 if (!node) {
1116 goto out; 1116 goto out;
1117 } 1117 }
1118 1118
@@ -1213,7 +1213,7 @@ int set_state_private(struct extent_io_tree *tree, u64 start, u64 private)
1213 * our range starts. 1213 * our range starts.
1214 */ 1214 */
1215 node = tree_search(tree, start); 1215 node = tree_search(tree, start);
1216 if (!node || IS_ERR(node)) { 1216 if (!node) {
1217 ret = -ENOENT; 1217 ret = -ENOENT;
1218 goto out; 1218 goto out;
1219 } 1219 }
@@ -1240,7 +1240,7 @@ int get_state_private(struct extent_io_tree *tree, u64 start, u64 *private)
1240 * our range starts. 1240 * our range starts.
1241 */ 1241 */
1242 node = tree_search(tree, start); 1242 node = tree_search(tree, start);
1243 if (!node || IS_ERR(node)) { 1243 if (!node) {
1244 ret = -ENOENT; 1244 ret = -ENOENT;
1245 goto out; 1245 goto out;
1246 } 1246 }
@@ -2642,7 +2642,7 @@ struct extent_buffer *alloc_extent_buffer(struct extent_io_tree *tree,
2642 int uptodate = 1; 2642 int uptodate = 1;
2643 2643
2644 eb = __alloc_extent_buffer(tree, start, len, mask); 2644 eb = __alloc_extent_buffer(tree, start, len, mask);
2645 if (!eb || IS_ERR(eb)) 2645 if (!eb)
2646 return NULL; 2646 return NULL;
2647 2647
2648 if (eb->flags & EXTENT_BUFFER_FILLED) 2648 if (eb->flags & EXTENT_BUFFER_FILLED)
@@ -2717,7 +2717,7 @@ struct extent_buffer *find_extent_buffer(struct extent_io_tree *tree,
2717 int uptodate = 1; 2717 int uptodate = 1;
2718 2718
2719 eb = __alloc_extent_buffer(tree, start, len, mask); 2719 eb = __alloc_extent_buffer(tree, start, len, mask);
2720 if (!eb || IS_ERR(eb)) 2720 if (!eb)
2721 return NULL; 2721 return NULL;
2722 2722
2723 if (eb->flags & EXTENT_BUFFER_FILLED) 2723 if (eb->flags & EXTENT_BUFFER_FILLED)