linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Btrfs: remove BUG_ON from get_restripe_target
@ 2012-04-04 20:19 Bobby Powers
  2012-04-05  0:46 ` Jeff Mahoney
  2012-04-05  2:04 ` [PATCH v2] Btrfs, lockdep: get_restripe_target: use lockdep in BUG_ON Bobby Powers
  0 siblings, 2 replies; 10+ messages in thread
From: Bobby Powers @ 2012-04-04 20:19 UTC (permalink / raw)
  Cc: Bobby Powers, Ilya Dryomov, Chris Mason, Andi Kleen, linux-btrfs,
	linux-kernel

spin_is_locked always returns 0 on non-SMP systems, which causes btrfs
to fail the mount.  There is documentation pending as to why checking
for spin_is_locked is a bad idea:

https://lkml.org/lkml/2012/3/27/413

As this was the only location in fs/btrfs/extent-tree.c that did
lock-correctness checking in a BUG_ON, simply remove it.

Signed-off-by: Bobby Powers <bobbypowers@gmail.com>
CC: Ilya Dryomov <idryomov@gmail.com>
CC: Chris Mason <chris.mason@oracle.com>
CC: Andi Kleen <ak@linux.intel.com>
CC: linux-btrfs@vger.kernel.org
CC: linux-kernel@vger.kernel.org
---
 fs/btrfs/extent-tree.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index a844204..c98b073 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -3158,9 +3158,6 @@ static u64 get_restripe_target(struct btrfs_fs_info *fs_info, u64 flags)
 	struct btrfs_balance_control *bctl = fs_info->balance_ctl;
 	u64 target = 0;
 
-	BUG_ON(!mutex_is_locked(&fs_info->volume_mutex) &&
-	       !spin_is_locked(&fs_info->balance_lock));
-
 	if (!bctl)
 		return 0;
 
-- 
1.7.10.rc3.3.g19a6c

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-04-07  1:06 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-04 20:19 [PATCH] Btrfs: remove BUG_ON from get_restripe_target Bobby Powers
2012-04-05  0:46 ` Jeff Mahoney
2012-04-05  1:19   ` Bobby Powers
2012-04-05  1:48     ` Bobby Powers
2012-04-05  2:04 ` [PATCH v2] Btrfs, lockdep: get_restripe_target: use lockdep in BUG_ON Bobby Powers
2012-04-05 16:23   ` Bobby Powers
2012-04-05 16:51     ` Ilya Dryomov
2012-04-06 17:20       ` Mitch Harder
2012-04-06 20:05   ` Ilya Dryomov
2012-04-07  1:06     ` Bobby Powers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).