projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8a56457
)
Btrfs: use right type to get real comparison
author
Liu Bo
<bo.li.liu@oracle.com>
Sun, 8 Jun 2014 11:04:13 +0000
(19:04 +0800)
committer
Chris Mason
<clm@fb.com>
Tue, 10 Jun 2014 00:21:15 +0000
(17:21 -0700)
We want to make sure the point is still within the extent item, not to verify
the memory it's pointing to.
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/backref.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/btrfs/backref.c
b/fs/btrfs/backref.c
index 84d0912eecb2c0f0c64764b303cbe1f216610746..00f9d9f911ca2ad58f9c1ba27b692dfd735024f5 100644
(file)
--- a/
fs/btrfs/backref.c
+++ b/
fs/btrfs/backref.c
@@
-1428,7
+1428,7
@@
static int __get_extent_inline_ref(unsigned long *ptr, struct extent_buffer *eb,
*out_eiref = (struct btrfs_extent_inline_ref *)(ei + 1);
}
*ptr = (unsigned long)*out_eiref;
- if ((
void *)*ptr >= (void *
)ei + item_size)
+ if ((
unsigned long)(*ptr) >= (unsigned long
)ei + item_size)
return -ENOENT;
}