* [PATCH] xfs: fix spin_is_locked assert on uni-processor builds
@ 2009-08-10 14:00 Christoph Hellwig
2009-08-10 14:19 ` Eric Sandeen
2009-09-25 20:17 ` Alex Elder
0 siblings, 2 replies; 3+ messages in thread
From: Christoph Hellwig @ 2009-08-10 14:00 UTC (permalink / raw)
To: xfs
Without SMP or preemption spin_is_locked always returns false,
so we can't do an assert with it. Instead use assert_spin_locked,
which does the right thing on all builds.
This fixes kernel.org BZ #13621.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reported-by: Johannes Engel <jcnengel@googlemail.com>
Tested-by: Johannes Engel <jcnengel@googlemail.com>
Index: linux-2.6/fs/xfs/xfs_log.c
===================================================================
--- linux-2.6.orig/fs/xfs/xfs_log.c 2009-08-09 23:27:07.889729629 -0300
+++ linux-2.6/fs/xfs/xfs_log.c 2009-08-09 23:27:24.092725926 -0300
@@ -3180,7 +3180,7 @@ try_again:
STATIC void
xlog_state_want_sync(xlog_t *log, xlog_in_core_t *iclog)
{
- ASSERT(spin_is_locked(&log->l_icloglock));
+ assert_spin_locked(&log->l_icloglock);
if (iclog->ic_state == XLOG_STATE_ACTIVE) {
xlog_state_switch_iclogs(log, iclog, 0);
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] xfs: fix spin_is_locked assert on uni-processor builds
2009-08-10 14:00 [PATCH] xfs: fix spin_is_locked assert on uni-processor builds Christoph Hellwig
@ 2009-08-10 14:19 ` Eric Sandeen
2009-09-25 20:17 ` Alex Elder
1 sibling, 0 replies; 3+ messages in thread
From: Eric Sandeen @ 2009-08-10 14:19 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
Christoph Hellwig wrote:
> Without SMP or preemption spin_is_locked always returns false,
> so we can't do an assert with it. Instead use assert_spin_locked,
> which does the right thing on all builds.
oops!
> This fixes kernel.org BZ #13621.
>
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Reported-by: Johannes Engel <jcnengel@googlemail.com>
> Tested-by: Johannes Engel <jcnengel@googlemail.com>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
>
> Index: linux-2.6/fs/xfs/xfs_log.c
> ===================================================================
> --- linux-2.6.orig/fs/xfs/xfs_log.c 2009-08-09 23:27:07.889729629 -0300
> +++ linux-2.6/fs/xfs/xfs_log.c 2009-08-09 23:27:24.092725926 -0300
> @@ -3180,7 +3180,7 @@ try_again:
> STATIC void
> xlog_state_want_sync(xlog_t *log, xlog_in_core_t *iclog)
> {
> - ASSERT(spin_is_locked(&log->l_icloglock));
> + assert_spin_locked(&log->l_icloglock);
>
> if (iclog->ic_state == XLOG_STATE_ACTIVE) {
> xlog_state_switch_iclogs(log, iclog, 0);
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] xfs: fix spin_is_locked assert on uni-processor builds
2009-08-10 14:00 [PATCH] xfs: fix spin_is_locked assert on uni-processor builds Christoph Hellwig
2009-08-10 14:19 ` Eric Sandeen
@ 2009-09-25 20:17 ` Alex Elder
1 sibling, 0 replies; 3+ messages in thread
From: Alex Elder @ 2009-09-25 20:17 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
Christoph Hellwig wrote:
> Without SMP or preemption spin_is_locked always returns false,
> so we can't do an assert with it. Instead use assert_spin_locked,
> which does the right thing on all builds.
>
> This fixes kernel.org BZ #13621.
Looks good.
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Reported-by: Johannes Engel <jcnengel@googlemail.com>
> Tested-by: Johannes Engel <jcnengel@googlemail.com>
Reviewed-by: Alex Elder <aelder@sgi.com>
> Index: linux-2.6/fs/xfs/xfs_log.c
> ===================================================================
> --- linux-2.6.orig/fs/xfs/xfs_log.c 2009-08-09 23:27:07.889729629 -0300
> +++ linux-2.6/fs/xfs/xfs_log.c 2009-08-09 23:27:24.092725926 -0300
> @@ -3180,7 +3180,7 @@ try_again:
> STATIC void
> xlog_state_want_sync(xlog_t *log, xlog_in_core_t *iclog)
> {
> - ASSERT(spin_is_locked(&log->l_icloglock));
> + assert_spin_locked(&log->l_icloglock);
>
> if (iclog->ic_state == XLOG_STATE_ACTIVE) {
> xlog_state_switch_iclogs(log, iclog, 0);
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-09-25 20:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-10 14:00 [PATCH] xfs: fix spin_is_locked assert on uni-processor builds Christoph Hellwig
2009-08-10 14:19 ` Eric Sandeen
2009-09-25 20:17 ` Alex Elder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox