]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
XFS: fix lock ASSERT on UP
authorAndi Kleen <ak@linux.intel.com>
Wed, 25 Apr 2012 01:03:50 +0000 (11:03 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 30 Apr 2012 05:17:27 +0000 (15:17 +1000)
ASSERT(!spin_is_locked()) doesn't work on UP builds.  Replace with a
standard lockdep_assert_held()

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Ben Myers <bpm@sgi.com>
Cc: Alex Elder <elder@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/xfs/xfs_iget.c

index bcc6c249b2c76016ad26efd15523073c569273a9..d2fe1ab056e9fe4cdea364cea68d8579974125ed 100644 (file)
@@ -76,7 +76,7 @@ xfs_inode_alloc(
        }
 
        ASSERT(atomic_read(&ip->i_pincount) == 0);
-       ASSERT(!spin_is_locked(&ip->i_flags_lock));
+       lockdep_assert_held(&ip->i_flags_lock);
        ASSERT(!xfs_isiflocked(ip));
        ASSERT(ip->i_ino == 0);
 
@@ -146,7 +146,7 @@ xfs_inode_free(
 
        /* asserts to verify all state is correct here */
        ASSERT(atomic_read(&ip->i_pincount) == 0);
-       ASSERT(!spin_is_locked(&ip->i_flags_lock));
+       lockdep_assert_held(&ip->i_flags_lock);
        ASSERT(!xfs_isiflocked(ip));
 
        /*