aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorLiu Bo <bo.li.liu@oracle.com>2014-06-08 07:04:13 -0400
committerChris Mason <clm@fb.com>2014-06-09 20:21:15 -0400
commitcd857dd6bc2ae9ecea14e75a34e8a8fdc158e307 (patch)
treef8d58a7edb5dc111c5377592ed3fd843e48f8930 /fs/btrfs
parent8a56457f5f8fa7c2698ffae8545214c5b96a2cb5 (diff)
Btrfs: use right type to get real comparison
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>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/backref.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
index 84d0912eecb2..00f9d9f911ca 100644
--- 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,
1428 *out_eiref = (struct btrfs_extent_inline_ref *)(ei + 1); 1428 *out_eiref = (struct btrfs_extent_inline_ref *)(ei + 1);
1429 } 1429 }
1430 *ptr = (unsigned long)*out_eiref; 1430 *ptr = (unsigned long)*out_eiref;
1431 if ((void *)*ptr >= (void *)ei + item_size) 1431 if ((unsigned long)(*ptr) >= (unsigned long)ei + item_size)
1432 return -ENOENT; 1432 return -ENOENT;
1433 } 1433 }
1434 1434