projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c2b9692
)
Btrfs: check btrfs_get_extent return for IS_ERR()
author
Dan Carpenter
<error27@gmail.com>
Sat, 20 Mar 2010 11:22:10 +0000
(11:22 +0000)
committer
Chris Mason
<chris.mason@oracle.com>
Wed, 31 Mar 2010 01:19:09 +0000
(21:19 -0400)
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>
fs/btrfs/ioctl.c
patch
|
blob
|
history
diff --git
a/fs/btrfs/ioctl.c
b/fs/btrfs/ioctl.c
index 74d89133f76866786c3df6c19a48000fd51674e5..2b7dd88fc54f22c63a4fe7cf1737d913f3bf3bad 100644
(file)
--- 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,
em = btrfs_get_extent(inode, NULL, 0, start, len, 0);
unlock_extent(io_tree, start, start + len - 1, GFP_NOFS);
- if (
!em
)
+ if (
IS_ERR(em)
)
return 0;
}