xfs
[Top] [All Lists]

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

To: stable@xxxxxxxxxx
Subject: [PATCH 4/4] xfs: fix spin_is_locked assert on uni-processor builds
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Wed, 19 Aug 2009 14:43:02 -0400
Cc: xfs@xxxxxxxxxxx, Felix Blyakher <felixb@xxxxxxx>
References: <20090819184258.542698202@xxxxxxxxxxxxxxxxxxxxxx>
User-agent: quilt/0.47-1
xfs: fix spin_is_locked assert on uni-processor builds
   
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.


upstream commit a8914f3a6d72c97328597a556a99daaf5cc288ae
    
Signed-off-by: Christoph Hellwig <hch@xxxxxx>
Reviewed-by: Eric Sandeen <sandeen@xxxxxxxxxxx>
Reported-by: Johannes Engel <jcnengel@xxxxxxxxxxxxxx>
Tested-by: Johannes Engel <jcnengel@xxxxxxxxxxxxxx>
Signed-off-by: Felix Blyakher <felixb@xxxxxxx>

diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index 3750f04..9dbdff3 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -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);

<Prev in Thread] Current Thread [Next in Thread>