diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2012-04-12 16:03:56 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2012-04-12 16:03:56 -0400 |
commit | c6664b42c4e567792abdb17c958fb01c5bcfcb3a (patch) | |
tree | 41a5f7e6f6507db58103ed3d96f3154e0fe04331 | |
parent | b89203f74bdfcb15407d54d3f257b16a2ea19e62 (diff) |
Btrfs: remove lock assert from get_restripe_target()
This fixes a regression introduced by fc67c450. spin_is_locked() always
returns 0 on UP kernels, which caused assert in get_restripe_target() to
be fired on every call from btrfs_reduce_alloc_profile() on UP systems.
Remove it completely for now, it's not clear if it's going to be needed
in future.
Reported-by: Bobby Powers <bobbypowers@gmail.com>
Reported-by: Mitch Harder <mitch.harder@sabayonlinux.org>
Tested-by: Mitch Harder <mitch.harder@sabayonlinux.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
-rw-r--r-- | fs/btrfs/extent-tree.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index ace5e8cef03e..a2134d8141c1 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
@@ -3152,15 +3152,14 @@ static void set_avail_alloc_bits(struct btrfs_fs_info *fs_info, u64 flags) | |||
3152 | /* | 3152 | /* |
3153 | * returns target flags in extended format or 0 if restripe for this | 3153 | * returns target flags in extended format or 0 if restripe for this |
3154 | * chunk_type is not in progress | 3154 | * chunk_type is not in progress |
3155 | * | ||
3156 | * should be called with either volume_mutex or balance_lock held | ||
3155 | */ | 3157 | */ |
3156 | static u64 get_restripe_target(struct btrfs_fs_info *fs_info, u64 flags) | 3158 | static u64 get_restripe_target(struct btrfs_fs_info *fs_info, u64 flags) |
3157 | { | 3159 | { |
3158 | struct btrfs_balance_control *bctl = fs_info->balance_ctl; | 3160 | struct btrfs_balance_control *bctl = fs_info->balance_ctl; |
3159 | u64 target = 0; | 3161 | u64 target = 0; |
3160 | 3162 | ||
3161 | BUG_ON(!mutex_is_locked(&fs_info->volume_mutex) && | ||
3162 | !spin_is_locked(&fs_info->balance_lock)); | ||
3163 | |||
3164 | if (!bctl) | 3163 | if (!bctl) |
3165 | return 0; | 3164 | return 0; |
3166 | 3165 | ||