diff options
author | Dan Carpenter <error27@gmail.com> | 2010-03-20 07:22:10 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2010-03-30 21:19:09 -0400 |
commit | 6cf8bfbf5e88edfb09a2bf0631a067060f534592 (patch) | |
tree | 70cc8040189bcd623e72ab1f09c6dc4fb40741e5 /fs/btrfs | |
parent | c2b96929e2ca6914cf4a66cd8fe2a34c4a98277f (diff) |
Btrfs: check btrfs_get_extent return for IS_ERR()
btrfs_get_extent() never returns NULL, only a valid pointer or ERR_PTR()
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/ioctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 74d89133f768..2b7dd88fc54f 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c | |||
@@ -510,7 +510,7 @@ static int should_defrag_range(struct inode *inode, u64 start, u64 len, | |||
510 | em = btrfs_get_extent(inode, NULL, 0, start, len, 0); | 510 | em = btrfs_get_extent(inode, NULL, 0, start, len, 0); |
511 | unlock_extent(io_tree, start, start + len - 1, GFP_NOFS); | 511 | unlock_extent(io_tree, start, start + len - 1, GFP_NOFS); |
512 | 512 | ||
513 | if (!em) | 513 | if (IS_ERR(em)) |
514 | return 0; | 514 | return 0; |
515 | } | 515 | } |
516 | 516 | ||