From: Andi Kleen Date: Thu, 3 May 2012 05:44:08 +0000 (+1000) Subject: XFS: fix lock ASSERT on UP X-Git-Tag: next-20120503~2^2~144 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=906b288c5c5395db9ad3d382455973717da839aa;p=karo-tx-linux.git XFS: fix lock ASSERT on UP ASSERT(!spin_is_locked()) doesn't work on UP builds. Replace with a standard lockdep_assert_held() Signed-off-by: Andi Kleen Cc: Ben Myers Cc: Alex Elder Signed-off-by: Andrew Morton --- diff --git a/fs/xfs/xfs_iget.c b/fs/xfs/xfs_iget.c index bcc6c249b2c7..d2fe1ab056e9 100644 --- a/fs/xfs/xfs_iget.c +++ b/fs/xfs/xfs_iget.c @@ -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)); /*