diff options
author | Tsutomu Itoh <t-itoh@jp.fujitsu.com> | 2011-02-13 19:45:29 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-02-14 16:21:37 -0500 |
commit | c26a920373a983b52223eed5a13b97404d8b4158 (patch) | |
tree | a7f76fe1b0cecbc712f0b152ff537805f126b113 /fs/btrfs/file.c | |
parent | 67100f255dba284bcbb5ce795355dad1cff35658 (diff) |
Btrfs: check return value of alloc_extent_map()
I add the check on the return value of alloc_extent_map() to several places.
In addition, alloc_extent_map() returns only the address or NULL.
Therefore, check by IS_ERR() is unnecessary. So, I remove IS_ERR() checking.
Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r-- | fs/btrfs/file.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index b0ff34b96607..65338a1d14ad 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c | |||
@@ -185,6 +185,7 @@ int btrfs_drop_extent_cache(struct inode *inode, u64 start, u64 end, | |||
185 | split = alloc_extent_map(GFP_NOFS); | 185 | split = alloc_extent_map(GFP_NOFS); |
186 | if (!split2) | 186 | if (!split2) |
187 | split2 = alloc_extent_map(GFP_NOFS); | 187 | split2 = alloc_extent_map(GFP_NOFS); |
188 | BUG_ON(!split || !split2); | ||
188 | 189 | ||
189 | write_lock(&em_tree->lock); | 190 | write_lock(&em_tree->lock); |
190 | em = lookup_extent_mapping(em_tree, start, len); | 191 | em = lookup_extent_mapping(em_tree, start, len); |