Re: [PATCH] hugetlb_cgroup: use lockdep_assert_held rather than spin_is_locked

2014-08-12 Thread Aneesh Kumar K.V
Michal Hocko writes: > spin_lock may be an empty struct for !SMP configurations and so > arch_spin_is_locked may return unconditional 0 and trigger the VM_BUG_ON > even when the lock is held. > > Replace spin_is_locked by lockdep_assert_held. We will not BUG anymore > but it is questionable wheth

[PATCH] hugetlb_cgroup: use lockdep_assert_held rather than spin_is_locked

2014-08-12 Thread Michal Hocko
spin_lock may be an empty struct for !SMP configurations and so arch_spin_is_locked may return unconditional 0 and trigger the VM_BUG_ON even when the lock is held. Replace spin_is_locked by lockdep_assert_held. We will not BUG anymore but it is questionable whether crashing makes a lot of sense i