From: David Woodhouse <dwmw2@infradead.org>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH] Remove BUG_ON(spin_trylock()) checks which have false positives on UP
Date: Tue, 22 Jul 2008 10:43:46 -0400 [thread overview]
Message-ID: <1216737826.18980.104.camel@shinybook.infradead.org> (raw)
In-Reply-To: <1216697801.18980.40.camel@shinybook.infradead.org>
On uniprocessor kernels without spinlock debugging, spinlock operations
are all no-ops and spin_trylock() will always succeed.
These BUG_ON() sanity checks are effectively an unconditional BUG() in
that case.
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
diff --git a/extent_map.c b/extent_map.c
index 71b1ac1..6a72961 100644
--- a/extent_map.c
+++ b/extent_map.c
@@ -209,7 +209,6 @@ int add_extent_mapping(struct extent_map_tree *tree,
struct extent_map *merge = NULL;
struct rb_node *rb;
- BUG_ON(spin_trylock(&tree->lock));
rb = tree_insert(&tree->map, em->start, &em->rb_node);
if (rb) {
ret = -EEXIST;
@@ -272,7 +271,6 @@ struct extent_map *lookup_extent_mapping(struct extent_map_tree *tree,
struct rb_node *next = NULL;
u64 end = range_end(start, len);
- BUG_ON(spin_trylock(&tree->lock));
em = tree->last;
if (em && end > em->start && start < extent_map_end(em))
goto found;
@@ -324,7 +322,6 @@ int remove_extent_mapping(struct extent_map_tree *tree, struct extent_map *em)
int ret = 0;
WARN_ON(test_bit(EXTENT_FLAG_PINNED, &em->flags));
- BUG_ON(spin_trylock(&tree->lock));
rb_erase(&em->rb_node, &tree->map);
em->in_tree = 0;
if (tree->last == em)
--
David Woodhouse Open Source Technology Centre
David.Woodhouse@intel.com Intel Corporation
next prev parent reply other threads:[~2008-07-22 14:43 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-22 3:32 [PATCH] Use do_div() instead of native 64-bit division in btrfs_ordered_sum_size() David Woodhouse
2008-07-22 3:36 ` kernel BUG at extent_map.c:275! David Woodhouse
2008-07-22 10:21 ` Chris Mason
2008-07-22 14:35 ` David Woodhouse
2008-07-22 17:03 ` Chris Mason
2008-07-22 17:41 ` David Woodhouse
2008-07-22 17:42 ` Zach Brown
2008-07-22 18:04 ` David Woodhouse
2008-07-24 14:34 ` Chris Mason
2008-07-22 18:12 ` Chris Mason
2008-07-22 14:43 ` David Woodhouse [this message]
2008-07-23 11:13 ` [PATCH] Use do_div() instead of native 64-bit division in btrfs_ordered_sum_size() Christoph Hellwig
2008-07-23 13:28 ` Chris Mason
2008-07-23 21:07 ` David Woodhouse
2008-07-24 0:19 ` Chris Mason
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1216737826.18980.104.camel@shinybook.infradead.org \
--to=dwmw2@infradead.org \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox