From 906b288c5c5395db9ad3d382455973717da839aa Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Thu, 3 May 2012 15:44:08 +1000 Subject: [PATCH] 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 --- fs/xfs/xfs_iget.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)); /* -- 2.39.5