xfs
[Top] [All Lists]

RE: [PATCH] xfs: fix spin_is_locked assert on uni-processor builds

To: "Christoph Hellwig" <hch@xxxxxxxxxxxxx>
Subject: RE: [PATCH] xfs: fix spin_is_locked assert on uni-processor builds
From: "Alex Elder" <aelder@xxxxxxx>
Date: Fri, 25 Sep 2009 15:17:59 -0500
Cc: <xfs@xxxxxxxxxxx>
In-reply-to: <20090810140006.GA21521@xxxxxxxxxxxxx>
Thread-index: AcoZxLN+c3XDQSKQQTS/gyW6yL9FIQkWHubA
Thread-topic: [PATCH] xfs: fix spin_is_locked assert on uni-processor builds
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@xxxxxx>
> Reported-by: Johannes Engel <jcnengel@xxxxxxxxxxxxxx>
> Tested-by: Johannes Engel <jcnengel@xxxxxxxxxxxxxx>
Reviewed-by: Alex Elder <aelder@xxxxxxx>

> 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@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/xfs

<Prev in Thread] Current Thread [Next in Thread>
  • RE: [PATCH] xfs: fix spin_is_locked assert on uni-processor builds, Alex Elder <=