[Ocfs2-devel] [PATCH 3/5] ocfs2: Add missing annotation for dlm_empty_lockres()

Andrew Morton akpm at linux-foundation.org
Wed Apr 15 20:02:01 PDT 2020


On Sat, 4 Apr 2020 07:45:49 +0800 Joseph Qi <joseph.qi at linux.alibaba.com> wrote:

> On 2020/4/4 00:05, Jules Irenge wrote:
> > Sparse reports a warning at dlm_empty_lockres()
> > 
> > warning: context imbalance in dlm_purge_lockres() - unexpected unlock
> > 
> > The root cause is the missing annotation at dlm_purge_lockres()
> > 
> > Add the missing __must_hold(&dlm->spinlock)
> > 
> Seems this is duplicate with assert_spin_locked()?

I doubt is sparse is smart enough to treat assert_spin_locked() as
equivalent to __must_hold().  It would be neat though.




More information about the Ocfs2-devel mailing list