diff options
author | Chris Mason <chris.mason@oracle.com> | 2012-02-28 12:42:44 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2012-03-03 07:42:35 -0500 |
commit | a175423c831ea582c06784d1e172d2ce1d79923a (patch) | |
tree | 742ca97279da69c981008620a3d2f0c48acdf6f4 /fs | |
parent | d3b010640e5c59b98d3b11229ba4cc2838dc7cbf (diff) |
Btrfs: fix casting error in scrub reada code
The reada code from scrub was casting down a u64 to
an unsigned long so it could insert it into a radix tree.
What it really wanted to do was cast down the result of a shift, instead
of casting down the u64. The bug resulted in trying to insert our
reada struct into the wrong place, which caused soft lockups and other
problems.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/reada.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/reada.c b/fs/btrfs/reada.c index 2373b39a132b..22db04550f6a 100644 --- a/fs/btrfs/reada.c +++ b/fs/btrfs/reada.c | |||
@@ -305,7 +305,7 @@ again: | |||
305 | 305 | ||
306 | spin_lock(&fs_info->reada_lock); | 306 | spin_lock(&fs_info->reada_lock); |
307 | ret = radix_tree_insert(&dev->reada_zones, | 307 | ret = radix_tree_insert(&dev->reada_zones, |
308 | (unsigned long)zone->end >> PAGE_CACHE_SHIFT, | 308 | (unsigned long)(zone->end >> PAGE_CACHE_SHIFT), |
309 | zone); | 309 | zone); |
310 | spin_unlock(&fs_info->reada_lock); | 310 | spin_unlock(&fs_info->reada_lock); |
311 | 311 | ||