Skip to content

Commit

Permalink
xfs: fix spin_is_locked assert on uni-processor builds
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
Reported-by: Johannes Engel <jcnengel@googlemail.com>
Tested-by: Johannes Engel <jcnengel@googlemail.com>
Signed-off-by: Felix Blyakher <felixb@sgi.com>
  • Loading branch information
Christoph Hellwig authored and Felix Blyakher committed Aug 12, 2009
1 parent b89d420 commit a8914f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/xfs/xfs_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -3180,7 +3180,7 @@ xlog_state_sync(xlog_t *log,
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);
Expand Down

0 comments on commit a8914f3

Please sign in to comment.