aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent-tree.c
diff options
context:
space:
mode:
authorTsutomu Itoh <t-itoh@jp.fujitsu.com>2011-02-01 04:17:35 -0500
committerChris Mason <chris.mason@oracle.com>2011-02-01 07:16:37 -0500
commit5df67083488ccbad925f583b698ab38f8629a016 (patch)
treeec428f27f1b72c4d8e284831d4bef8894b2b8457 /fs/btrfs/extent-tree.c
parentc87fb6fdcaf7560940b31a0c78c3e6370e3433cf (diff)
btrfs: checking NULL or not in some functions
Because NULL is returned when the memory allocation fails, it is checked whether it is NULL. Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r--fs/btrfs/extent-tree.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index f96641a93fc9..9de4ff03882a 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -6496,6 +6496,8 @@ static noinline int relocate_inode_pages(struct inode *inode, u64 start,
6496 int ret = 0; 6496 int ret = 0;
6497 6497
6498 ra = kzalloc(sizeof(*ra), GFP_NOFS); 6498 ra = kzalloc(sizeof(*ra), GFP_NOFS);
6499 if (!ra)
6500 return -ENOMEM;
6499 6501
6500 mutex_lock(&inode->i_mutex); 6502 mutex_lock(&inode->i_mutex);
6501 first_index = start >> PAGE_CACHE_SHIFT; 6503 first_index = start >> PAGE_CACHE_SHIFT;